home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 029a / helppc.zip / INTERRUP.TXT < prev    next >
Text File  |  1990-11-27  |  232KB  |  8,417 lines

  1. @Interrupt Services DOS∙BIOS∙EMS∙Mouse
  2. :int table:interrupt table:exceptions:irq
  3. ^Intel Defined CPU Exception Table (see notes)
  4.  
  5. %Interrupt         Function
  6.  
  7.     0        Divide by zero
  8.     1        Single step
  9.     2        Non-maskable  (NMI)
  10.     3        Breakpoint
  11.     4        Overflow trap
  12.     5        BOUND range exceeded (186,286,386)
  13.     6        Invalid opcode (186,286,386)
  14.     7        Coprocessor not available (286,386)
  15.     8        Double fault exception (286,386)
  16.     9        Coprocessor segment overrun (286,386)
  17.     A        Invalid task state segment (286,386)
  18.     B        Segment not present (286,386)
  19.     C        Stack exception (286,386)
  20.     D        General protection exception (286,386)
  21.     E        Page fault (286,386)
  22.     F        Reserved
  23.    10        Coprocessor error (286,386)
  24.  
  25. ^IBM PC Hardware Interrupt Table (in order of priority)
  26.  
  27. %IRQ#  Interrupt         Function
  28.  
  29.  IRQ0      8     timer (55ms intervals, 18.2 per second)
  30.  IRQ1      9     keyboard service required
  31.  IRQ2      A     slave 8259 or EGA/VGA vertical retrace
  32.  IRQ8     70     real time clock  (AT,XT286,PS50+)
  33.  IRQ9     71     software redirected to IRQ2  (AT,XT286,PS50+)
  34.  IRQ10    72     reserved  (AT,XT286,PS50+)
  35.  IRQ11    73     reserved  (AT,XT286,PS50+)
  36.  IRQ12    74     mouse interrupt  (PS50+)
  37.  IRQ13    75     numeric coprocessor error  (AT,XT286,PS50+)
  38.  IRQ14    76     fixed disk controller (AT,XT286,PS50+)
  39.  IRQ15    77     reserved  (AT,XT286,PS50+)
  40.  IRQ3      B     COM2 service required, (COM3-COM8 on MCA PS2)
  41.  IRQ4      C     COM1 service required
  42.  IRQ5      D     fixed disk or data request from LPT2
  43.  IRQ6      E     floppy disk service required
  44.  IRQ7      F     data request from LPT1 (unreliable on IBM mono)
  45.  
  46.  
  47. ^Interrupt Table as Implemented by System BIOS/DOS
  48.  
  49. %INT #    Locus         Function
  50.  
  51.    0       CPU      divide by zero
  52.    1       CPU      single step
  53.    2       CPU      non-maskable
  54.    3       CPU      breakpoint
  55.    4       CPU      overflow trap
  56.    5       BIOS     print screen
  57.    6       CPU      Invalid opcode (186,286,386)
  58.    7       CPU      coprocessor not available (286,386)
  59.    8       IRQ0     timer (55ms intervals, 18.21590 per second)
  60.    9       IRQ1     keyboard service required (see INT 9)
  61.    A       IRQ2     slave 8259 or EGA/VGA vertical retrace
  62.    B       IRQ3     COM2 service required (PS2 MCA COM3-COM8)
  63.    C       IRQ4     COM1 service required
  64.    D       IRQ5     fixed disk or data request from LPT2
  65.    E       IRQ6     floppy disk service required
  66.    F       IRQ7     data request from LPT1 (unreliable on IBM mono)
  67.   10       BIOS     video (see INT 10)
  68.   11       BIOS     Equipment determination (see INT 11)
  69.   12       BIOS     memory size (see INT 12)
  70.   13       BIOS     disk I/O service  (see INT 13)
  71.   14       BIOS     serial communications (see INT 14)
  72.   15       BIOS     system services, cassette (see INT 15)
  73.   16       BIOS     keyboard services (see INT 16)
  74.   17       BIOS     parallel printer (see INT 17)
  75.   18       BIOS     ROM BASIC loader
  76.   19       BIOS     bootstrap loader (unreliable, see INT 19)
  77.   1A       BIOS     time of day  (see INT 1A)
  78.   1B       BIOS     user defined ctrl-break handler (see INT 1B)
  79.   1C       BIOS     user defined clock tick handler (see INT 1C)
  80.   1D       BIOS     6845 video parameter pointer
  81.   1E       BIOS     diskette parameter pointer (base table)
  82.   1F       BIOS     graphics character table
  83.   20       DOS      general program termination
  84.   21       DOS      function request services (see INT 21)
  85.   22       DOS      terminate address (see INT 22)
  86.   23       DOS      control break termination address (see INT 23)
  87.   24       DOS      critical error handler (see INT 24)
  88.   25       DOS      absolute disk read (see INT 25)
  89.   26       DOS      absolute disk write (see INT 26)
  90.   27       DOS      terminate and stay resident (see INT 27)
  91.   28       DOS      idle loop, issued by DOS when idle (see INT 28)
  92.   29       DOS      fast TTY console I/O (see INT 29)
  93.   2A       DOS      critical section and NETBIOS (see INT 2A)
  94.   2B       DOS      internal
  95.   2C       DOS      internal
  96.   2D       DOS      internal
  97.   2E       DOS      exec command from base level command
  98.                     interpreter  (see INT 2E)
  99.   2F       DOS      multiplexer (see INT 2F)
  100.   30-31    CPM      far jump vector for CPM (not an interrupt)
  101.   32                reserved
  102.   33                mouse support (see INT 33)
  103.   34-3E             Microsoft/Borland floating point emulation
  104.   3F                overlay manager
  105.   40       BIOS     hard disk
  106.   41       BIOS     fixed disk 0 parameters pointer (see INT 13,9)
  107.   42       BIOS     relocated video handler (EGA/VGA/PS)
  108.   43       BIOS     user font table (EGA/VGA/PS)
  109.   44       BIOS     first 128 graphics characters (also Netware)
  110.   45       BIOS     reserved for BIOS
  111.   46       BIOS     fixed disk 1 parameters ptr (see INT 13,9/INT 41)
  112.   47       BIOS     reserved for BIOS
  113.   48       BIOS     PCjr cordless keyboard translation
  114.   49       BIOS     PCjr non-keyboard scancode translation table
  115.   4A       BIOS     user alarm  (AT/CONV/PS2) (see INT 4A)
  116.   4B-4F    BIOS     reserved
  117.   50       BIOS     periodic alarm from timer (PS2)
  118.   51-58    BIOS     reserved
  119.   59       BIOS     GSS Computer Graphics Interface
  120.   5A       BIOS     cluster adapter BIOS entry point
  121.   5B       BIOS     cluster adapter boot
  122.   5C       NETBIOS  NETBIOS interface, TOPS interface
  123.   5D-5F    BIOS     reserved for BIOS
  124.   60-67             reserved for user software interrupts
  125.   67       EMS      LIM/EMS specification (see INT 67)
  126.   68                APPC
  127.   69-6B             reserved by IBM
  128.   6C       DOS      DOS 3.2 real time clock update
  129.            BIOS     system resume vector
  130.   6D-6F             reserved
  131.   70       IRQ8     real time clock  (AT,XT286,PS50+, see INT 15)
  132.   71       IRQ9     software redirected to IRQ2  (AT,XT286,PS50+)
  133.   72       IRQ10    reserved  (AT,XT286,PS50+)
  134.   73       IRQ11    reserved  (AT,XT286,PS50+)
  135.   74       IRQ12    mouse interrupt  (PS50+)
  136.   75       IRQ13    numeric coprocessor NMI error  (AT,XT286,PS50+)
  137.   76       IRQ14    fixed disk controller (AT,XT286,PS50+)
  138.   77       IRQ15    reserved  (AT,XT286,PS50+)
  139.   78-79             unused
  140.   80-85             ROM BASIC
  141.   86-F0    DOS      reserved for BASIC interpreter use
  142.   86       NETBIOS  NETBIOS relocated INT 18h
  143.   E0       CPM      CP/M 86 function calls
  144.   F1-FF             reserved by IBM
  145.   FE-FF             may be destroyed by return from protected
  146.                     mode using VDISK on 286 machines (Apr 86, DDJ)
  147.  
  148.  
  149.  - Intel defined 0 through 20h for use for internal CPU;  IBM
  150.    redefined interrupts 0 through 1Fh for its own use, hence
  151.    the duplicate definitions in the tables
  152.  - all interrupts except the internal CPU exceptions push the
  153.    flags and the CS:IP of the next instruction onto the stack.
  154.    CPU exception interrupts are similar but push the CS:IP of the
  155.    causal instruction.   8086/88 divide exceptions are different,
  156.    they return to the instruction following the division
  157.  - interrupts are disabled upon entry into any interrupt routine and
  158.    should be enabled by the user or by an IRET
  159.  - in DOS 3.2+ hardware IRQ interrupts are re-vectored through DOS
  160.    to provide standard stack frames
  161.  
  162. :int 5
  163. ^INT 5 - Print Screen
  164.  
  165.  
  166.  no input data
  167.  
  168.  
  169. %related memory:
  170.  
  171.  50:0 = 00  Print screen has not been called, or upon return
  172.             from a call there were no errors
  173.       = 01  Print screen is already in progress
  174.       = FF  Error encountered during printing
  175.  
  176.  
  177.  - invoked from INT 9
  178.  
  179. :int 8:bios timer interrupt
  180. ^INT 8 - System timer
  181.  
  182.  no input data
  183.  
  184. %related memory:
  185.  
  186.     40:6C = Daily timer counter (4 bytes)
  187.     40:70 = 24 hr overflow flag (1 byte)
  188.     40:67 = Day counter on all products after AT
  189.     40:40 = Motor shutoff counter - decremented until 0 then
  190.             shuts off diskette motor
  191.  
  192.  
  193.  - INT 1C is invoked as a user interrupt
  194.  - the byte at 40:70 is a flag that certain DOS functions use
  195.    and adjust the date if necessary.  Since this is a flag and
  196.    not a counter it results in DOS (not the RTC) losing days
  197.    when several midnights pass before a DOS call
  198.  - generated 18.2 times per second by the 8253 Programmable Interval
  199.    Timer (PIT)
  200.  - normal INT 8 execution takes approximately 100 microseconds
  201.  
  202.  - see   8253
  203.  
  204. :int 9:keyboard interrupt
  205. ^INT 9 - Keyboard Interrupt (Hardware Handler)
  206.  
  207.  no input data
  208.  
  209. %related memory:
  210.  
  211.  40:17 = updates keyboard flag byte 0
  212.  40:18 = updates keyboard flag byte 1
  213.  40:1A = queue head ptr is set to buffer start if Ctrl-Break is hit
  214.  40:1C = updates buffer tail pointer for each keystroke; sets
  215.          queue tail ptr is set to queue start if Ctrl-Break is hit
  216.  40:1E = updates keyboard buffer (32 bytes)
  217.  40:71 = updates bit 7 of the BIOS break flag if Ctrl-Break is hit
  218.  40:72 = updates reset flag with 1234H if Ctrl-Alt-Del pressed
  219.  40:96 = indicates keyboard type (AT,PS2)
  220.  40:97 = updates keyboard LED flags (AT,PS2)
  221.  FFFF:0 = reboot code called if Ctrl-Alt-Del pressed
  222.  
  223. %related interrupts:
  224.  
  225.  INT 05    invoked if print screen key pressed
  226.  INT 1B    invoked if Ctrl-Break key sequence pressed
  227.  INT 15,85 invoked on AT if system request key is pressed
  228.  INT 15,4F invoked on machines after PC/AT with AL = scan code
  229.  
  230.  
  231.  - records key press and key release via IRQ1/8259 and
  232.    stores scan codes in the BIOS buffer located at 40:1C
  233.  - keyboard controllers also buffer data when interrupts are
  234.    disabled at the 8259 interrupt controller
  235.  - keyboard controller is capable of storing 16 keystrokes
  236.    even when interrupts are disabled at the 8259
  237.  - normal INT 9 execution takes approximately 500 microseconds;
  238.    at least one standard XT BIOS is known to take up to 1.3
  239.    milliseconds to execute
  240.  
  241.  - see   MAKE CODES   KB FLAGS
  242.  
  243. :int 10:bios video services:video interrupt
  244. ^INT 10 - Video BIOS Services
  245.  
  246. %Function requested in AH; see also  INT 10,N  where N is:
  247.  
  248.      0 - Set video mode
  249.      1 - Set cursor type
  250.      2 - Set cursor position
  251.      3 - Read cursor position
  252.      4 - Read light pen
  253.      5 - Select active display page
  254.      6 - Scroll active page up
  255.      7 - Scroll active page down
  256.      8 - Read character and attribute at cursor
  257.      9 - Write character and attribute at cursor
  258.      A - Write character at current cursor
  259.      B - Set color palette
  260.      C - Write graphics pixel at coordinate
  261.      D - Read graphics pixel at coordinate
  262.      E - Write text in teletype mode
  263.      F - Get current video state
  264.     10 - Set/get palette registers (EGA/VGA)
  265.     11 - Character generator routine (EGA/VGA)
  266.     12 - Video subsystem configuration (EGA/VGA)
  267.     13 - Write string (BIOS after 1/10/86)
  268.     14 - Load LCD char font (convertible)
  269.     15 - Return physical display parms (convertible)
  270.     1A - Video Display Combination (VGA)
  271.     1B - Video BIOS Functionality/State Information (MCGA/VGA)
  272.     1C - Save/Restore Video State  (VGA only)
  273.     FE - Get DESQView/TopView Virtual Screen Regen Buffer
  274.     FF - Update DESQView/TopView Virtual Screen Regen Buffer
  275.  
  276.  
  277.  Warning: Some BIOS implementations have a bug that causes
  278.  register BP to be destroyed.   It is advisable to save BP
  279.  before a call to Video BIOS routines on these systems.
  280.  
  281.  - see  INT 1F   INT 1D   INT 29   INT 21,2   INT 21,6   INT 21,9
  282.  
  283. :int 10,0:video modes
  284. ^INT 10,0 - Set Video Mode
  285.  
  286.  AH = 00
  287.  AL = 00  40x25 B/W text (CGA,EGA,MCGA,VGA)
  288.     = 01  40x25 16 color text (CGA,EGA,MCGA,VGA)
  289.     = 02  80x25 16 shades of gray text (CGA,EGA,MCGA,VGA)
  290.     = 03  80x25 16 color text (CGA,EGA,MCGA,VGA)
  291.     = 04  320x200 4 color graphics (CGA,EGA,MCGA,VGA)
  292.     = 05  320x200 4 color graphics (CGA,EGA,MCGA,VGA)
  293.     = 06  640x200 B/W graphics (CGA,EGA,MCGA,VGA)
  294.     = 07  80x25 Monochrome text (MDA,HERC,EGA,VGA)
  295.     = 08  160x200 16 color graphics (PCjr)
  296.     = 09  320x200 16 color graphics (PCjr)
  297.     = 0A  640x200 4 color graphics (PCjr)
  298.     = 0B  Reserved (EGA BIOS function 11)
  299.     = 0C  Reserved (EGA BIOS function 11)
  300.     = 0D  320x200 16 color graphics (EGA,VGA)
  301.     = 0E  640x200 16 color graphics (EGA,VGA)
  302.     = 0F  640x350 Monochrome graphics (EGA,VGA)
  303.     = 10  640x350 16 color graphics (EGA or VGA with 128K)
  304.           640x350 4 color graphics (64K EGA)
  305.     = 11  640x480 B/W graphics (MCGA,VGA)
  306.     = 12  640x480 16 color graphics (VGA)
  307.     = 13  320x200 256 color graphics (MCGA,VGA)
  308.     = 8x  EGA, MCGA or VGA ignore bit 7, see below
  309.     = 9x  EGA, MCGA or VGA ignore bit 7, see below
  310.  
  311.  
  312.  - if AL bit 7=1, prevents EGA,MCGA & VGA from clearing display
  313.  - function updates byte at 40:49;  bit 7 of byte 40:87
  314.    (EGA/VGA Display Data Area) is set to the value of AL bit 7
  315.  
  316. :int 10,1
  317. ^INT 10,1 - Set Cursor Type
  318.  
  319.  
  320.  AH = 01
  321.  CH = cursor starting scan line (cursor top) (low order 5 bits)
  322.  CL = cursor ending scan line (cursor bottom) (low order 5 bits)
  323.  
  324.  
  325.  returns nothing
  326.  
  327.  
  328.  - cursor lines are zero based
  329.  - monochrome uses starting line 0Bh and ending line 0Ch
  330.  - color uses starting line 6 and ending line 7
  331.  
  332. :int 10,2
  333. ^INT 10,2 - Set Cursor Position
  334.  
  335.  
  336.  AH = 02
  337.  BH = page number (0 for graphics modes)
  338.  DH = row
  339.  DL = column
  340.  
  341.  
  342.  returns nothing
  343.  
  344.  
  345.  - positions relative to 0,0 origin
  346.  - 80x25 mode has coordinates 0,0 to 24,79
  347.  - 40x25 mode has coordinates 0,0 to 24,39
  348.  - see   VIDEO PAGES
  349.  
  350. :int 10,3
  351. ^INT 10,3 - Read Cursor Position and Size
  352.  
  353.  
  354.  AH = 03
  355.  BH = video page
  356.  
  357.  
  358.  on return:
  359.  CH = cursor starting scan line (low order 5 bits)
  360.  CL = cursor ending scan line (low order 5 bits)
  361.  DH = row
  362.  DL = column
  363.  
  364.  
  365.  - returns data from BIOS DATA AREA at location 40:50
  366.  
  367. :int 10,4
  368. ^INT 10,4 - Read Light Pen Position
  369.  
  370.  
  371.  AH = 04
  372.  
  373.  
  374.  on return:
  375.  AH = 0  light pen switch not triggered
  376.     = 1  light pen triggered
  377.  BX = pixel column (0-319 or 0-639, mode dependent)
  378.  CH = raster line (0-199) (CGA and EGA modes 4, 5 and 6)
  379.  CX = raster line (EGA modes except 4, 5 and 6)
  380.  DH = row (0-24)
  381.  DL = column (0-79 or 0-79 mode dependent)
  382.  
  383.  
  384.  - data returned as a byte coordinate, leaving horizontal
  385.    accuracy to within 2 pixels (320) or 4 pixels (640)
  386.  - vertical accuracy within 2 lines
  387.  - PS2's don't support the light pen interface
  388.  
  389. :int 10,5
  390. ^INT 10,5 - Select Active Display Page
  391.  
  392.  AH = 05
  393.  AL = new page number, see VIDEO PAGES
  394.  
  395.  for PCjr only:
  396.  AL = 80h to read CRT/CPU page registers
  397.       81h to set CPU page register
  398.           BL = CPU page register
  399.       82h to set CRT page register
  400.           BH = CRT page register
  401.       83h to set CPU and page registers
  402.           BH = CRT page register
  403.           BL = CPU page register
  404.  
  405.  
  406.  on return: (PCjr only)
  407.  BH = CRT page register
  408.  BL = CPU page register
  409.  
  410.  - see   VIDEO PAGES
  411. :int 10,6
  412. ^INT 10,6 - Scroll Window Up
  413.  
  414.  
  415.  AH = 06
  416.  AL = number of lines to scroll, previous lines are
  417.       blanked, if 0 or AL > screen size, window is blanked
  418.  BH = attribute to be used on blank line
  419.  CH = row of upper left corner of scroll window
  420.  CL = column of upper left corner of scroll window
  421.  DH = row of lower right corner of scroll window
  422.  DL = column of lower right corner of scroll window
  423.  
  424.  
  425.  returns nothing
  426.  
  427.  
  428.  - in video mode 4 (300x200 4 color) on the EGA, MCGA and VGA
  429.    this function scrolls page 0 regardless of the current page
  430.  - can be used to scroll graphics screens, using character coords
  431.  - on CGA's this function disables video adapter, causing flitter
  432. :int 10,7
  433. ^INT 10,7 - Scroll Window Down
  434.  
  435.  
  436.  AH = 07
  437.  AL = number of lines to scroll, previous lines are
  438.       blanked, if 0 or AL > screen size, window is blanked
  439.  BH = attribute to be used on blank line
  440.  CH = row of upper left corner of scroll window
  441.  CL = column of upper left corner of scroll window
  442.  DH = row of lower right corner of scroll window
  443.  DL = column of lower right corner of scroll window
  444.  
  445.  
  446.  returns nothing
  447.  
  448.  
  449.  - in video mode 4 (300x200 4 color) on the EGA, MCGA and VGA
  450.    this function scrolls page 0 regardless of the current page
  451.  - can be used to scroll graphics screens, using character coords
  452.  - on CGA's this function disables video adapter, causing flitter
  453.  
  454. :int 10,8
  455. ^INT 10,8 - Read Character and Attribute at Cursor Position
  456.  
  457.  
  458.  AH = 08
  459.  BH = display page
  460.  
  461.  
  462.  on return:
  463.  AH = attribute of character (alpha modes only)
  464.  AL = character at cursor position
  465.  
  466.  
  467.  - in video mode 4 (300x200 4 color) on the EGA, MCGA and VGA
  468.    this function works only on page zero
  469.  
  470. :int 10,9
  471. ^INT 10,9 - Write Character and Attribute at Cursor Position
  472.  
  473.  
  474.  AH = 09
  475.  AL = ASCII character to write
  476.  BH = display page  (or mode 13h, background pixel value)
  477.  BL = character attribute (text) foreground color (graphics)
  478.  CX = count of characters to write (CX >= 1)
  479.  
  480.  
  481.  returns nothing
  482.  
  483.  
  484.  - does not move the cursor
  485.  - in graphics mode (except mode 13h), if BL bit 7=1 then
  486.    value of BL is XOR'ed with the background color
  487.  
  488. :int 10,a
  489. ^INT 10,A - Write Character Only at Current Cursor Position
  490.  
  491.  
  492.  AH = 0A
  493.  AL = ASCII character to write
  494.  BH = display page  (or mode 13h, background pixel value)
  495.  BL = foreground color (graphics mode only)
  496.  CX = count of characters to write (CX >= 1)
  497.  
  498.  
  499.  return nothing
  500.  
  501.  
  502.  - similar to INT 10,9 except color ignored in text modes
  503.  
  504. :int 10,b
  505. ^INT 10,B - Set Color Palette
  506.  
  507.  AH = 0B
  508.  BH = palette color ID
  509.     = 0  to set background and border color
  510.     = 1  to select 4 color palette
  511.  BL = color value (when BH = 0)
  512.     = palette value (when BH = 1)
  513.  
  514.  Palette    Pixel          Color
  515.     0         0      current background color
  516.               1      green (2)
  517.               2      red (4)
  518.               3      brown (6)
  519.     1         0      current background color
  520.               1      cyan (3)
  521.               2      magenta (5)
  522.               3      white (7)
  523.  
  524.  - does not work for all EGA and VGA video modes
  525.  - sets border color in text mode (BH = 0)
  526.  
  527. :int 10,c
  528. ^INT 10,C - Write Graphics Pixel at Coordinate
  529.  
  530.  
  531.  AH = 0C
  532.  AL = color value (XOR'ED with current pixel if bit 7=1)
  533.  BH = page number
  534.  CX = column number (zero based)
  535.  DX = row number (zero based)
  536.  
  537.  
  538.  returns nothing
  539.  
  540.  
  541.  - if bit 7 is 1, color specified is XOR'ed with current pixel
  542.  - page number in BH ignored for 320x200 4 color graphics mode
  543.  - see   VIDEO PAGES
  544.  
  545. :int 10,d
  546. ^INT 10,D - Read Graphics Pixel at Coordinate
  547.  
  548.  
  549.  AH = 0D
  550.  BH = page number
  551.  CX = column number (zero based)
  552.  DX = row number (zero based)
  553.  
  554.  
  555.  on return:
  556.  AL = color of pixel read
  557.  
  558.  
  559.  - 64K IBM EGAs with BIOS dated 9/13/84 in 350 line video
  560.    modes,  return invalid data in AL
  561.  - page number in BH ignored for 320x200 4 color graphics mode
  562.  - see   VIDEO PAGES
  563.  
  564. :int 10,e
  565. ^INT 10,E - Write Text in Teletype Mode
  566.  
  567.  
  568.  AH = 0E
  569.  AL = ASCII character to write
  570.  BH = page number (text modes)
  571.  BL = foreground pixel color (graphics modes)
  572.  
  573.  
  574.  returns nothing
  575.  
  576.  
  577.  - cursor advances after write
  578.  - characters BEL (7), BS (8), LF (A), and CR (D) are
  579.    treated as control codes
  580.  - for some older BIOS (10/19/81), the BH register must point
  581.    to the currently displayed page
  582.  - on CGA's this function can disable video adapter, causing flitter
  583.  
  584. :int 10,f
  585. ^INT 10,F - Get Video State
  586.  
  587.  
  588.  AH = 0F
  589.  
  590.  
  591.  on return:
  592.  AH = number of screen columns
  593.  AL = mode currently set (see VIDEO MODES)
  594.  BH = current display page
  595.  
  596.  
  597.  - video modes greater than 13h on EGA, MCGA and VGA indicate
  598.    INT 10,0 was called with the high bit of the mode (AL) set
  599.    to 1, meaning the display does not need cleared
  600.  - function returns byte value at 40:49;  On EGA, MCGA and
  601.    VGA bit 7 of register AL is determined by bit 7 of BIOS Data
  602.    Area byte 40:87.   This bit is usually set by INT 10,0
  603.    with bit 7 of the requested mode (in AL) set to 1
  604.  
  605. :int 10,10
  606. ^INT 10,10 - Set/Get Palette Registers (EGA/VGA)
  607.  
  608.  AH = 10h
  609.  
  610. %AL = 00  set individual palette register
  611.     BH = color value
  612.     BL = palette register
  613.  
  614.  
  615. %AL = 01  set border color (overscan register)
  616.     BH = color value
  617.  
  618.  
  619. %AL = 02  set all palette registers and border
  620.     ES:DX = pointer to 17 byte table representing 16 palette
  621.             registers and border color register
  622.  
  623.  
  624. %AL = 03  toggle intensity/blinking (EGA)
  625.     BL = 0  enable intensity
  626.          1  enable blinking
  627.  
  628.  
  629. %AL = 07  read palette register (PS2)
  630.     BL = palette register to read (0-15)
  631.  
  632.  on return:
  633.    BH = value of palette register
  634.  
  635.  
  636. %AL = 08  read border color (overscan register, PS2)
  637.  
  638.  on return:
  639.    BH = value of border color (overscan register)
  640.  
  641.  
  642. %AL = 09  read palette registers and border (PS2)
  643.     ES:DX = pointer to 17 byte table representing 16 palette
  644.             registers and border color register
  645.  
  646.  on return:
  647.  ES:DX = pointer to table provided as input
  648.  
  649.  
  650. %AL = 10  set DAC color register
  651.     BX = color register to set
  652.     CH = green value
  653.     CL = blue value
  654.     DH = red value
  655.  
  656.  
  657. %AL = 12  set block of DAC color registers
  658.     BX = first color register to set
  659.     CX = number of color registers to set
  660.     ES:DX = pointer to table of color values to set
  661.  
  662.  
  663. %AL = 13  set attribute controller color select state
  664.     BL = 0  set Mode Control register bit 7
  665.        BH = value for bit 7
  666.     BL = 1  set color select register
  667.        BH = value for color select register
  668.  
  669.  
  670. %AL = 15  read DAC color register (PS2)
  671.     BX = color register to read
  672.  
  673.  on return:
  674.  CH = green value
  675.  CL = blue value
  676.  DH = red value
  677.  
  678.  
  679. %AL = 17  read block of DAC color registers
  680.     BX = first color register to read
  681.     CX = number of color registers to read
  682.     ES:DX = pointer to buffer for color registers
  683.  
  684.  on return:
  685.  ES:DX = pointer to color table provided as input
  686.  
  687.  
  688. %AL = 18  update video DAC mask register
  689.     BL = new mask
  690.  
  691.  
  692. %AL = 19  read video DAC mask register
  693.  
  694.  on return:
  695.  BL = value read from video DAC mask register
  696.  
  697.  
  698. %AL = 1A  read color page state
  699.     BL = bit 7 of Mode Control Register
  700.     BH = bits 2 thru 3 of Color select register if BL = 0
  701.        = bits 0 thru 3 of Color select register if BL = 1
  702.  
  703.  on return:
  704.  BL = current paging mode
  705.  CX = current page
  706.  
  707.  
  708.  
  709. %AL = 1B  sum color values to shades of gray
  710.     BX = first color register to sum
  711.     CX = number of color registers to sum
  712.  
  713.  
  714.  - controls the pixel color mapping bit values
  715.  - BIOS extension to EGA/VGA systems
  716.  
  717. :int 10,11
  718. ^INT 10,11 - Character Generator Routine (EGA/VGA)
  719.  
  720.  AH = 11h
  721.  
  722. %AL = 00  user character load
  723.     BH = number of bytes per character
  724.     BL = table in character generator RAM
  725.     CX = count of characters in table
  726.     DX = ASCII code of first character defined
  727.     ES:BP = pointer to user table
  728.  
  729.  
  730. %AL = 01  ROM BIOS 8x14 monochrome set
  731.     BL = table in character generator RAM
  732.  
  733.  
  734. %AL = 02  ROM BIOS 8x8 double dot
  735.     BL = table in character generator RAM
  736.  
  737.  
  738. %AL = 03  set displayed definition table
  739.     BL = value for character Map Select register (EGA,VGA)
  740.        = character generator RAM table numbers (MCGA)
  741.  
  742.  
  743. %AL = 04  ROM BIOS 8x16 character set
  744.     BL = table in character generator RAM
  745.  
  746.  
  747. %AL = 10  user specified character definition table
  748.     BH = bytes per character (points)
  749.     BL = table in character generator RAM
  750.     CX = number of characters defined in table
  751.     DX = ASCII code of first character defined
  752.     ES:BP = pointer to user table
  753.  
  754.  
  755. %AL = 11  ROM BIOS 8x14 monochrome character set
  756.     BL = table in character generator RAM
  757.  
  758.  
  759. %AL = 12  ROM 8x8 double dot character definitions
  760.     BL = table in character generator RAM
  761.  
  762.  
  763. %AL = 14  ROM 8x16 double dot character definitions
  764.     BL = table in character generator RAM
  765.  
  766.  
  767. %AL = 20  pointer to graphics character table for INT 1F (8x8)
  768.     ES:BP = pointer to user table
  769.  
  770.  
  771. %AL = 21  user graphics character pointer at INT 43
  772.     BL = row specifier
  773.        = 0 - user specified  (DL = rows)
  774.        = 1 is 14 rows
  775.        = 2 is 25 rows
  776.        = 3 is 43 rows
  777.     CX = bytes per character (points)
  778.     DL = rows (when BL = 0)
  779.     ES:BP = pointer to user table
  780.  
  781.  
  782. %AL = 22  ROM 8x14 character set
  783.     BL = number of rows (see AL=21)
  784.     DL = rows (when BL = 0)
  785.  
  786.  
  787. %AL = 23  ROM 8x8 double dot character set
  788.     BL = row specifier (see AL=21)
  789.     DL = rows (when BL = 0)
  790.  
  791.  
  792. %AL = 24  ROM 8x16 character set
  793.     BL = row specifier (see AL=21)
  794.     DL = rows (when BL = 0)
  795.  
  796.  
  797. %AL = 30  get current character generator information
  798.     BH = information desired:
  799.        = 0  INT 1F pointer
  800.        = 1  INT 44h pointer
  801.        = 2  ROM 8x14 pointer
  802.        = 3  ROM 8x8 double dot pointer (base)
  803.        = 4  ROM 8x8 double dot pointer (top)
  804.        = 5  ROM 9x14 alpha alternate pointer
  805.        = 6  ROM 8x16 character table pointer
  806.        = 7  ROM 9x16 alternate character table pointer
  807.  
  808.  on return:
  809.  CX = bytes per character (points)
  810.  DL = rows (less 1)
  811.  ES:BP = pointer to table
  812.  
  813. :int 10,12
  814. ^INT 10,12 - Video Subsystem Configuration (EGA/VGA)
  815.  
  816.  AH = 12h
  817.  
  818.  
  819. %BL = 10  return video configuration information
  820.  
  821.  on return:
  822.  BH = 0 if color mode in effect
  823.     = 1 if mono mode in effect
  824.  BL = 0 if 64k EGA memory
  825.     = 1 if 128k EGA memory
  826.     = 2 if 192k EGA memory
  827.     = 3 if 256k EGA memory
  828.  CH = feature bits
  829.  CL = switch settings
  830.  
  831.  
  832. %BL = 20  select alternate print screen routine
  833.  
  834. %BL = 30  select scan lines for alphanumeric modes
  835.     AL = 0  200 scan lines
  836.        = 1  350 scan lines
  837.        = 2  400 scan lines
  838.  
  839.  on return:
  840.  AL = 12
  841.  
  842.  
  843. %BL = 31  select default palette loading
  844.     AL = 0 enable default palette loading
  845.        = 1 disable default palette loading
  846.  
  847.  on return:
  848.  AL = 12
  849.  
  850.  
  851. %BL = 32  CPU access to video RAM
  852.     AL = 0  enable CPU access to video RAM and I/O ports
  853.        = 1  disable CPU access to video RAM and I/O ports
  854.  
  855.  on return:
  856.  AL = 12
  857.  
  858.  
  859. %BL = 33  Gray scale summing
  860.     AL = 0  enable gray scale summing
  861.        = 2  disable gray scale summing
  862.  
  863.  on return:
  864.  AL = 12
  865.  
  866.  
  867. %BL = 34  cursor emulation
  868.     AL = 0  enable cursor emulation
  869.        = 1  disable cursor emulation
  870.  
  871.  on return:
  872.  AL = 12
  873.  
  874.  
  875. %BL = 35  PS2 video display switching
  876.     AL = 0 initial adapter video off
  877.        = 1 initial planar video on
  878.        = 2 switch active video off
  879.        = 3 switch inactive video on
  880.     ES:DX pointer to 128 byte save area (when AL = 0, 2 or 3)
  881.  
  882.  on return:
  883.  AL = 12
  884.  
  885.  
  886. %BL = 36  video refresh control
  887.     AL = 0 enable refresh
  888.        = 1 disable refresh
  889.  
  890.  on return:
  891.  AL = 12
  892.  
  893. :int 10,13
  894. ^INT 10,13 - Write String (BIOS versions from 1/10/86)
  895.  
  896.  AH = 13h
  897.  AL = write mode (see bit settings below)
  898.     = 0 string is chars only, attribute in BL, cursor not moved
  899.     = 1 string is chard only, attribute in BL, cursor moved
  900.     = 2 string contains chars and attributes, cursor not moved
  901.     = 3 string contains chars and attributes, cursor moved
  902.  BH = video page number
  903.  BL = attribute if mode 0 or 1 (AL bit 1=0)
  904.  CX = length of string (ignoring attributes)
  905.  DH = row coordinate
  906.  DL = column coordinate
  907.  ES:BP = pointer to string
  908.  
  909.  
  910.  Bit settings for write mode (register AL):
  911.  
  912.  │7│6│5│4│3│2│1│0│  AL
  913.   │ │ │ │ │ │ │ └──── 0=don't move cursor, 1=move cursor
  914.   │ │ │ │ │ │ └───── 0=BL has attributes, 1=string has attributes
  915.   └─┴─┴─┴─┴─┴────── unused
  916.  
  917.  
  918.  returns nothing
  919.  
  920.  
  921.  - BEL, BS, CR, LF are treated as ASCII control codes
  922.  - wraps data and scrolls if unable to fit data on one line
  923.  
  924. :int 10,14
  925. ^INT 10,14 - Load LCD Character Font (convertible only)
  926.  
  927.  AH = 14h
  928.  
  929. %AL = 0 - load user specified font
  930.     ES:DI = pointer to character font
  931.     CX = number of characters to store
  932.     DX = char offset into ram font area
  933.     BH = number of bytes per character
  934.     BL = 0  load main font (block 0)
  935.        = 1  load alternate font (block 1)
  936.  
  937. %AL = 1 - load system ROM default font
  938.     BL = 0  load main font (block 0)
  939.        = 1  load alternate font (block 1)
  940.  
  941. %AL = 2 - set mapping of LCD high intensity attribute
  942.     BL = 0  ignore high intensity attribute
  943.        = 1  map high intensity to underscore
  944.        = 2  map high intensity to reverse video
  945.        = 3  map high intensity to select alternate font
  946. :int 10,15
  947. ^INT 10,15 - Return Physical Display Parms (convertible)
  948.  
  949.  
  950.  AH = 15h
  951.  
  952.  on return:
  953.  AX = alternate display adapter type
  954.  ES:DI = pointer to parameter table:
  955.  
  956.  
  957. %Offset Size       Description
  958.  
  959.    01   word   monitor model number
  960.    02   word   vertical pels per meter
  961.    03   word   horizontal pels per meter
  962.    04   word   total number of vertical pels
  963.    05   word   total number of horizontal pels
  964.    06   word   horizontal pel separation in micrometers
  965.    07   word   vertical pel separation in micrometers
  966.  
  967. :int 10,1a
  968. ^INT 10,1A - Video Display Combination (VGA)
  969.  
  970.  AH = 1A
  971.  AL = 00 get video display combination
  972.     = 01 set video display combination
  973.       BL = active display  (see table below)
  974.       BH = inactive display
  975.  
  976.  
  977.  on return:
  978.  AL = 1A, if a valid function was requested in AH
  979.  BL = active display  (AL=00, see table below)
  980.  BH = inactive display  (AL=00)
  981.  
  982. %Valid display codes:
  983.  
  984.   FF  Unrecognized video system
  985.   00  No display
  986.   01  MDA with monochrome display
  987.   02  CGA with color display
  988.   03  Reserved
  989.   04  EGA with color display
  990.   05  EGA with monochrome display
  991.   06  Professional graphics controller
  992.   07  VGA with analog monochrome display
  993.   08  VGA with analog color display
  994.   09  Reserved
  995.   0A  MCGA with digital color display
  996.   0B  MCGA with analog monochrome display
  997.   0C  MCGA with analog color display
  998.  
  999.  - returns value at byte 40:8A indicating display combination status
  1000.  - used to detect video display capabilities
  1001.  
  1002. :int 10,1b
  1003. ^INT 10,1B - Video BIOS Functionality and
  1004. ^State Information (MCGA/VGA)
  1005.  
  1006.  AH = 1B
  1007.  BX = implementation type (must be zero)
  1008.  ES:DI = pointer to 64 byte buffer
  1009.  
  1010.  
  1011.  on return:
  1012.  AL = 1B
  1013.  ES:DI = pointer to updated buffer  (see below)
  1014.  
  1015.  
  1016.  - returns static and dynamic information about the current
  1017.    state and capabilities of the current video system
  1018.  - bytes 0-3 of the dynamic data table at ES:DI contain a far
  1019.    pointer to the video static information table
  1020.  
  1021.  
  1022. ^Video BIOS Dynamic Functionality State Table (MCGA/VGA)
  1023.  
  1024. %Dynamic Video State Table
  1025.  
  1026.  00  dword   address of static functionality table
  1027.  04  byte    video mode
  1028.  05  word    number of columns
  1029.  07  word    length of displayed video buffer (# bytes)
  1030.  09  word    start address of upper left corner of video buffer
  1031.  0B  16bytes cursor position table for 8 pages (col,row)
  1032.  1B  byte    cursor end line
  1033.  1C  byte    cursor start line
  1034.  1D  byte    active video page
  1035.  1E  word    I/O port for CRTC address register
  1036.  20  byte    current value of CRTC 3x8 register
  1037.  21  byte    current value of CRTC 3x9 register
  1038.  22  byte    number of displayed character rows
  1039.  23  word    height of character matrix (points)
  1040.  25  byte    active display combination code
  1041.  26  byte    inactive display combination code
  1042.  27  word    number of displayed colors (mono = 0)
  1043.  29  byte    number of supported video pages
  1044.  2A  byte    raster scan lines 0=200, 1=350, 2=400, 3=480
  1045.  2B  byte    text character table used
  1046.  2C  byte    text character table used
  1047.  2D  byte    other state information:
  1048.  
  1049.     │7│6│5│4│3│2│1│0│ State Information byte at offset 2D
  1050.      │ │ │ │ │ │ │ └─── 1 = all modes active (MCGA always 0)
  1051.      │ │ │ │ │ │ └──── 1 = gray scale summing enabled
  1052.      │ │ │ │ │ └───── 1 = monochrome display attached
  1053.      │ │ │ │ └────── 1 = default palette loading disabled
  1054.      │ │ │ └─────── 1 = cursor emulation enabled
  1055.      │ │ └──────── 1 = blinking attribute enabled
  1056.      └─┴───────── 1 = reserved
  1057.  
  1058.  2E 3bytes   reserved
  1059.  31  byte    video RAM available 0=64K, 1=128K, 2=192K, 3=256K
  1060.  32  byte    save area status
  1061.  
  1062.     │7│6│5│4│3│2│1│0│ Save Area Status
  1063.      │ │ │ │ │ │ │ └─── 1 = two text char sets are active
  1064.      │ │ │ │ │ │ └──── 1 = dynamic save area is active
  1065.      │ │ │ │ │ └───── 1 = text char set override is active
  1066.      │ │ │ │ └────── 1 = graphics char set is override active
  1067.      │ │ │ └─────── 1 = palette override is active
  1068.      │ │ └──────── 1 = display combination code ext. active
  1069.      └─┴───────── 1 = reserved
  1070.  
  1071.  33  dword   reserved
  1072.  
  1073.  
  1074. ^Video BIOS Static Functionality Table  (EGA/VGA)
  1075.  
  1076.  │7│6│5│4│3│2│1│0│ Video modes supported, byte at offset 00
  1077.   │ │ │ │ │ │ │ └─── 1 = mode 0
  1078.   │ │ │ │ │ │ └──── 1 = mode 1
  1079.   │ │ │ │ │ └───── 1 = mode 2
  1080.   │ │ │ │ └────── 1 = mode 3
  1081.   │ │ │ └─────── 1 = mode 4
  1082.   │ │ └──────── 1 = mode 5
  1083.   │ └───────── 1 = mode 6
  1084.   └────────── 1 = mode 7
  1085.  
  1086.  │7│6│5│4│3│2│1│0│ Video modes supported, byte at offset 01
  1087.   │ │ │ │ │ │ │ └─── 1 = mode 8
  1088.   │ │ │ │ │ │ └──── 1 = mode 9
  1089.   │ │ │ │ │ └───── 1 = mode A
  1090.   │ │ │ │ └────── 1 = mode B
  1091.   │ │ │ └─────── 1 = mode C
  1092.   │ │ └──────── 1 = mode D
  1093.   │ └───────── 1 = mode E
  1094.   └────────── 1 = mode F
  1095.  
  1096.  │7│6│5│4│3│2│1│0│ Video modes supported, byte at offset 02
  1097.   │ │ │ │ │ │ │ └─── 1 = mode 10
  1098.   │ │ │ │ │ │ └──── 1 = mode 11
  1099.   │ │ │ │ │ └───── 1 = mode 12
  1100.   │ │ │ │ └────── 1 = mode 13
  1101.   └─┴─┴─┴─────── reserved
  1102.  
  1103.  03  dword  reserved
  1104.  07  byte   scan lines supported in text modes
  1105.  
  1106.  │7│6│5│4│3│2│1│0│ Scan lines supported, byte at offset 07
  1107.   │ │ │ │ │ │ │ └─── 1 = 200 lines
  1108.   │ │ │ │ │ │ └──── 1 = 350 lines
  1109.   └─┴─┴─┴─┴─┴───── 1 = 400 lines
  1110.  
  1111.  08  byte   max number of displayable text character sets
  1112.  09  byte   # of text definition tables in char generator RAM
  1113.  0A  byte   other capability flags
  1114.  
  1115.      │7│6│5│4│3│2│1│0│ Other flags, byte at offset 0A
  1116.       │ │ │ │ │ │ │ └─── 1 = all modes (0 on MCGA)
  1117.       │ │ │ │ │ │ └──── 1 = gray scale summing
  1118.       │ │ │ │ │ └───── 1 = character set loading
  1119.       │ │ │ │ └────── 1 = default palette loading
  1120.       │ │ │ └─────── 1 = cursor emulation
  1121.       │ │ └──────── 1 = 64 color palette
  1122.       │ └───────── 1 = video DAC loading
  1123.       └────────── 1 = DAC controlled by ACCS
  1124.  
  1125.  0B  byte   other capability flags
  1126.  
  1127.      │7│6│5│4│3│2│1│0│ Other flags, byte at offset 0B
  1128.       │ │ │ │ │ │ │ └─── 1 = light pen support
  1129.       │ │ │ │ │ │ └──── 1 = save/restore video state
  1130.       │ │ │ │ │ └───── 1 = blinking/background intensity
  1131.       │ │ │ │ └────── 1 = display combination code
  1132.       └─┴─┴─┴─────── reserved
  1133.  
  1134.  0C  word   reserved
  1135.  0E  byte   save area capabilities
  1136.  
  1137.      │7│6│5│4│3│2│1│0│  save area capabilities, byte at offset 0E
  1138.       │ │ │ │ │ │ │ └──── 1 = multiple text character sets
  1139.       │ │ │ │ │ │ └───── 1 = dynamic save area
  1140.       │ │ │ │ │ └────── 1 = text character set override
  1141.       │ │ │ │ └─────── 1 = graphics character set override
  1142.       │ │ │ └──────── 1 = palette override
  1143.       │ │ └───────── 1 = display combination code extension
  1144.       └─┴────────── reserved
  1145.  
  1146.  0F  byte    reserved
  1147. :int 10,1c
  1148. ^INT 10,1C - Save/Restore Video State  (VGA only)
  1149.  
  1150.  AH = 1C
  1151.  
  1152. %AL = 0  get save buffer size
  1153.     CX = requested states
  1154.          bit 0: video hardware state
  1155.          bit 1: video BIOS data areas
  1156.          bit 2: video DAC state
  1157.  
  1158.  on return:
  1159.  AL = 1C
  1160.  BX = buffer size in 64 byte blocks
  1161.  
  1162. %AL = 1  save requested state
  1163.     CX = requested states (see AL = 0)
  1164.     ES:BX = pointer to buffer
  1165.  
  1166.  returns nothing
  1167.  
  1168. %AL = 2  restore requested states
  1169.     CX = requested states (see AL = 0)
  1170.     ES:BX = pointer to buffer
  1171.  
  1172.  returns nothing
  1173.  
  1174. :int 10,fe
  1175. ^INT 10,FE - Get DESQView/TopView Virtual Screen Regen Buffer
  1176.  
  1177.  
  1178.  AH = FE
  1179.  ES:DI = set to sentinel value (test for INT 10,FE supported)
  1180.  
  1181.  
  1182.  returns:
  1183.  ES:DI = address of DESQView/TopView video buffer, DI will always
  1184.          be zero
  1185.  
  1186.  
  1187.  - on return ES:DI should be tested against the original value;
  1188.    the value will change if this function is supported (DESQView
  1189.    or TopView loaded), otherwise it will remain unchanged
  1190.  - if ES:DI changes this address can be used as the video screen
  1191.    regen buffer
  1192.  
  1193. :int 10,ff
  1194. ^INT 10,FF - Update DESQView/TopView Virtual Screen Regen Buffer
  1195.  
  1196.  
  1197.  AH = FF
  1198.  CX = number of characters changed
  1199.  ES:DI = pointer to first character in buffer to change,  ES is
  1200.          set to segment returned by INT 10,FE
  1201.  
  1202.  
  1203.  returns nothing
  1204.  
  1205.  
  1206.  - the physical screen does not get updated until INT 10,FF is
  1207.    called in TopView
  1208.  - it is not necessary to make this call under DESQView since it
  1209.    handles updates automatically
  1210.  - calling this function under DESQView will cancel the automatic
  1211.    update mode
  1212.  
  1213. :int 11:equipment flags
  1214. ^INT 11 - BIOS Equipment Determination / BIOS Equipment Flags
  1215.  
  1216.  no input data
  1217.  
  1218.  on return:
  1219.  AX contains the following bit flags:
  1220.  
  1221.  │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  AX
  1222.   │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └──── IPL diskette installed
  1223.   │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───── math coprocessor
  1224.   │ │ │ │ │ │ │ │ │ │ │ │ └─┴────── old PC system board RAM < 256K
  1225.   │ │ │ │ │ │ │ │ │ │ │ │ │ └───── pointing device installed (PS2)
  1226.   │ │ │ │ │ │ │ │ │ │ │ │ └────── not used on PS2
  1227.   │ │ │ │ │ │ │ │ │ │ └─┴─────── initial video mode
  1228.   │ │ │ │ │ │ │ │ └─┴────────── # of diskette drives, less 1
  1229.   │ │ │ │ │ │ │ └───────────── 0 if DMA installed
  1230.   │ │ │ │ └─┴─┴────────────── number of serial ports
  1231.   │ │ │ └─────────────────── game adapter installed
  1232.   │ │ └──────────────────── unused, internal modem (PS2)
  1233.   └─┴───────────────────── number of printer ports
  1234.  
  1235.  
  1236.  - bits 3 & 2,  system board RAM if less than 256K motherboard
  1237.      00 - 16K                 01 - 32K
  1238.      10 - 16K                 11 - 64K (normal)
  1239.  
  1240.  - bits 5 & 4,  initial video mode
  1241.      00 - unused              01 - 40x25 color
  1242.      10 - 80x25 color         11 - 80x25 monochrome
  1243.  
  1244.  
  1245.  - bits 7 & 6,  number of disk drives attached, when bit 0=1
  1246.      00 - 1 drive             01 - 2 drives
  1247.      10 - 3 drive             11 - 4 drives
  1248.  
  1249.  
  1250.  - returns data stored at BIOS data location 40:10
  1251.  - some flags are not guaranteed to be correct on all machines
  1252.  - bit 13 is used on the PCjr to indicate serial printer
  1253.  
  1254. :int 12
  1255. ^INT 12 - Memory Size Determination
  1256.  
  1257.  
  1258.  no input data
  1259.  
  1260.  
  1261.  on return:
  1262.  AX  = the number of contiguous 1k memory blocks found at startup
  1263.  
  1264.  - contiguous memory does not include video memory or extended RAM
  1265.  
  1266. :int 13:bios disk services
  1267. ^INT 13 - Diskette BIOS Services
  1268.  
  1269. %Function requested in AH; see also  INT 13,N  where N is:
  1270.  
  1271.      0 - Reset disk system
  1272.      1 - Get disk status
  1273.      2 - Read disk sectors
  1274.      3 - Write disk sectors
  1275.      4 - Verify disk sectors
  1276.      5 - Format disk track
  1277.      6 - Format track and set bad sector flag (XT & portable)
  1278.      7 - Format the drive starting at track (XT & portable)
  1279.      8 - Get current drive parameters (XT & newer, see note ╪)
  1280.      9 - Initialize 2 fixed disk base tables (XT & newer, see note ╪)
  1281.      A - Read long sector (XT & newer, see note ╪)
  1282.      B - Write long sector (XT & newer, see note ╪)
  1283.      C - Seek to cylinder (XT & newer, see note ╪)
  1284.      D - Alternate disk reset (XT & newer, see note ╪)
  1285.      E - Read sector buffer (XT & portable only)
  1286.      F - Write sector buffer (XT & portable only)
  1287.     10 - Test for drive ready (XT & newer, see note ╪)
  1288.     11 - Recalibrate drive (XT & newer, see note ╪)
  1289.     12 - Controller ram diagnostic (XT & portable only)
  1290.     13 - Drive diagnostic (XT & portable only)
  1291.     14 - Controller internal diagnostic (XT & newer, see note ╪)
  1292.     15 - Read disk type/DASD type (XT BIOS from 1/10/86 & newer)
  1293.     16 - Disk change line status (XT BIOS from 1/10/86 & newer)
  1294.     17 - Set dasd type for format (XT BIOS from 1/10/86 & newer)
  1295.     18 - Set media type for format (BIOS date specific)
  1296.     19 - Park fixed disk heads (AT & newer)
  1297.     1A - Format ESDI drive unit (PS2 50+)
  1298.  
  1299.  
  1300.  ╪  The 1983 version of the "IBM XT BIOS Technical Reference"
  1301.     shows these functions are available for the XT but many other
  1302.     programming references say they aren't available until the AT.
  1303.     This is probably due to misunderstanding the design of the disk
  1304.     BIOS.   Upon bootup the hard disk BIOS replaces the default
  1305.     INT 13h diskette handler with the hard disk INT 13h handler.
  1306.  
  1307.  
  1308. %Most disk BIOS calls use the following parameter scheme:
  1309.  
  1310.      AH = function request number
  1311.      AL = number of sectors  (1-128 dec.)
  1312.      CH = cylinder number  (0-1023 dec.)
  1313.      CL = sector number  (1-17 dec.)
  1314.      DH = head number  (0-15 dec.)
  1315.      DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1316.      DL = drive number (0=A:, 1=2nd floppy, 80h=C:, 81h=D:)
  1317.           Note that some programming references use (0-3) as the
  1318.           drive number which represents diskettes only.
  1319.      ES:BX = address of user buffer
  1320.  
  1321.  
  1322. %and return with:
  1323.  CF = 0 if successful
  1324.     = 1 if error
  1325.  AH = status of operation  (see INT 13,STATUS)
  1326.  
  1327.  
  1328.  - INT 13 diskette read functions should be retried at least 3
  1329.    times to assure the disk motor has time to spin up to speed
  1330.  - physical sector numbers can be converted to and from DOS sector
  1331.    numbers with the following formulas:
  1332.  
  1333.    dos_sector = (sector - 1) + (head * sectors_per_track) +
  1334.                 (track * sectors_per_track * num_heads)
  1335.  
  1336.    physical_sector = 1 + (dos_sector  MOD  sectors_per_track)
  1337.    physical_head = (dos_sector / sectors_per_track)  MOD  num_heads
  1338.    physical_track = dos_sector / (sectors_per_track * num_heads)
  1339.  
  1340.  - see  INT 13,n  where n is the function code
  1341.  - see  INT 13,STATUS
  1342.  
  1343. :int 13,0
  1344. ^INT 13,0 - Reset Disk System
  1345.  
  1346.  
  1347.  AH = 00
  1348.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1349.  
  1350.  
  1351.  on return:
  1352.  AH = disk operation status  (see INT 13,STATUS)
  1353.  CF = 0 if successful
  1354.     = 1 if error
  1355.  
  1356.  
  1357.  - clears reset flag in controller and pulls heads to track 0
  1358.  - setting the controller reset flag causes the disk to recalibrate
  1359.    on the next disk operation
  1360.  - if bit 7 is set, the diskette drive indicated by the lower 7 bits
  1361.    will reset then the hard disk will follow; return code in AH is
  1362.    for the drive requested
  1363.  
  1364. :int 13,1:int 13,status
  1365. ^INT 13,1 - Disk Status
  1366.  
  1367.  AH = 01
  1368.  
  1369.  on return:
  1370.  AL = status:
  1371.  
  1372. %Status in AL
  1373.  
  1374.     00  no error
  1375.     01  bad command passed to driver
  1376.     02  address mark not found or bad sector
  1377.     03  diskette write protect error
  1378.     04  sector not found
  1379.     05  fixed disk reset failed
  1380.     06  diskette changed or removed
  1381.     07  bad fixed disk parameter table
  1382.     08  DMA overrun
  1383.     09  DMA access across 64k boundary
  1384.     0A  bad fixed disk sector flag
  1385.     0B  bad fixed disk cylinder
  1386.     0C  unsupported track/invalid media
  1387.     0D  invalid number of sectors on fixed disk format
  1388.     0E  fixed disk controlled data address mark detected
  1389.     0F  fixed disk DMA arbitration level out of range
  1390.     10  ECC/CRC error on disk read
  1391.     11  recoverable fixed disk data error, data fixed by ECC
  1392.     20  controller error (NEC for floppies)
  1393.     40  seek failure
  1394.     80  time out, drive not ready
  1395.     AA  fixed disk drive not ready
  1396.     BB  fixed disk undefined error
  1397.     CC  fixed disk write fault on selected drive
  1398.     E0  fixed disk status error/Error reg = 0
  1399.     FF  sense operation failed
  1400.  
  1401.  
  1402.  - codes represent controller status after last disk operation
  1403.  - returns the status byte located at 40:41 in the BIOS Data Area
  1404.  
  1405. :int 13,2
  1406. ^INT 13,2 - Read Disk Sectors
  1407.  
  1408.  AH = 02
  1409.  AL = number of sectors to read  (1-128 dec.)
  1410.  CH = track/cylinder number  (0-1023 dec., see below)
  1411.  CL = sector number  (1-17 dec.)
  1412.  DH = head number  (0-15 dec.)
  1413.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1414.  ES:BX = pointer to buffer
  1415.  
  1416.  
  1417.  on return:
  1418.  AH = status  (see INT 13,STATUS)
  1419.  AL = number of sectors read
  1420.  CF = 0 if successful
  1421.     = 1 if error
  1422.  
  1423.  
  1424.  - BIOS disk reads should be retried at least three times and the
  1425.    controller should be reset upon error detection
  1426.  - be sure ES:BX does not cross a 64K segment boundary or a
  1427.    DMA boundary error will occur
  1428.  - many programming references list only floppy disk register values
  1429.  - only the disk number is checked for validity
  1430.  - the parameters in CX change depending on the number of cylinders;
  1431.    the track/cylinder number is a 10 bit value taken from the 2 high
  1432.    order bits of CL and the 8 bits in CH (low order 8 bits of track):
  1433.  
  1434.    │F│E│D│C│B│A│9│8│7│6│5-0│  CX
  1435.     │ │ │ │ │ │ │ │ │ │  └─────  sector number
  1436.     │ │ │ │ │ │ │ │ └─┴───────  high order 2 bits of track/cylinder
  1437.     └─┴─┴─┴─┴─┴─┴─┴──────────  low order 8 bits of track/cyl number
  1438.  
  1439.  - see   INT 13,STATUS   INT 13,A
  1440.  
  1441. :int 13,3
  1442. ^INT 13,3 - Write Disk Sectors
  1443.  
  1444.  AH = 03
  1445.  AL = number of sectors to write  (1-128 dec.)
  1446.  CH = track/cylinder number  (0-1023 dec.)
  1447.  CL = sector number  (1-17 dec., see below)
  1448.  DH = head number  (0-15 dec.)
  1449.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1450.  ES:BX = pointer to buffer
  1451.  
  1452.  
  1453.  on return:
  1454.  AH = 0 if CF=0; otherwise disk status  (see INT 13,STATUS)
  1455.  AL = number of sectors written
  1456.  CF = 0 if successful
  1457.     = 1 if error
  1458.  
  1459.  
  1460.  - BIOS disk write attempts should reset the controller on error
  1461.  - be sure ES:BX does not cross a 64K segment boundary or a
  1462.    DMA boundary error will occur
  1463.  - IBM PC XT 286 does not require a value in AL, though it is
  1464.    recommended that one be supplied for portability
  1465.  - many programming references list only floppy disk register values
  1466.  - only the disk number is checked for validity
  1467.  - the parameters in CX change depending on the number of cylinders;
  1468.    the track/cylinder number is a 10 bit value taken from the 2 high
  1469.    order bits of CL and the 8 bits in CH (low order 8 bits of track):
  1470.  
  1471.    │F│E│D│C│B│A│9│8│7│6│5-0│  CX
  1472.     │ │ │ │ │ │ │ │ │ │  └─────  sector number
  1473.     │ │ │ │ │ │ │ │ └─┴───────  high order 2 bits of track/cylinder
  1474.     └─┴─┴─┴─┴─┴─┴─┴──────────  low order 8 bits of track/cyl number
  1475.  
  1476.  - see   INT 13,STATUS   INT 13,B
  1477.  
  1478. :int 13,4
  1479. ^INT 13,4 - Verify Disk Sectors
  1480.  
  1481.  AH = 04
  1482.  AL = number of sectors to verify  (1-128 dec.)
  1483.  CH = track/cylinder number  (0-1023 dec., see below)
  1484.  CL = sector number  (1-17 dec.)
  1485.  DH = head number  (0-15 dec.)
  1486.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1487.  ES:BX = pointer to buffer
  1488.  
  1489.  on return:
  1490.  AH = status  (see INT 13,STATUS)
  1491.  AL = number of sectors verified
  1492.  CF = 0 if successful
  1493.     = 1 if error
  1494.  
  1495.  
  1496.  - BIOS disk reads should be retried at least three times and the
  1497.    controller should be reset upon error detection
  1498.  - causes controller to calculate the CRC of the disk data and
  1499.    compare it against the CRC stored in the sector header
  1500.  - BIOS before 11/15/85 required ES:BX point to a valid buffer
  1501.    that doesn't cross DMA boundaries.   More recent BIOS versions
  1502.    actually ignore the buffer and the DMA boundary requirement
  1503.  - use this function to check for valid formatted diskette in a
  1504.    the specified drive and for drive ready for read
  1505.  - only the disk number is checked for validity
  1506.  - the parameters in CX change depending on the number of cylinders;
  1507.    the track/cylinder number is a 10 bit value taken from the 2 high
  1508.    order bits of CL and the 8 bits in CH (low order 8 bits of track):
  1509.  
  1510.    │F│E│D│C│B│A│9│8│7│6│5-0│  CX
  1511.     │ │ │ │ │ │ │ │ │ │  └─────  sector number
  1512.     │ │ │ │ │ │ │ │ └─┴───────  high order 2 bits of track/cylinder
  1513.     └─┴─┴─┴─┴─┴─┴─┴──────────  low order 8 bits of track/cyl number
  1514.  
  1515.  - see   INT 13,STATUS   DETECTING
  1516.  
  1517. :int 13,5
  1518. ^INT 13,5 - Format Disk Track
  1519.  
  1520.  AH = 05
  1521.  AL = interleave value (XT only)
  1522.  CX = track/cylinder number (see below for format)
  1523.  DH = head number  (0-15 dec.)
  1524.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1525.  ES:BX = pointer to block of "track address fields" containing
  1526.          four byte fields for each sector to be formatted of the form:
  1527.  
  1528.         1 byte  track number
  1529.         1 byte  head number           Size      #
  1530.         1 byte  sector number         Codes   Bytes
  1531.         1 byte  sector size code        0      128
  1532.                                         1      256
  1533.                                         2      512
  1534.                                         3     1024
  1535.  on return:
  1536.  AH = status  (see INT 13,STATUS)
  1537.  CF = 0 if successful
  1538.     = 1 if error
  1539.  
  1540.  
  1541.  - BIOS disk write attempts should reset the controller on error
  1542.  - INT 13,17 should be called to set the DASD type
  1543.  - this function is capable of doing great damage if the parameters
  1544.    are incorrectly specified; only the drive number is checked
  1545.  - initializes disk address fields and data sectors
  1546.  - interleave is specified by ordering of track address fields
  1547.  - after INT 13 disk format, if the disk is to be used with DOS the
  1548.    DOS data structure must be written
  1549.  - only the disk number is checked for validity
  1550.  - the parameters in CX change depending on the number of cylinders;
  1551.    the track/cylinder number is a 10 bit value taken from the 2 high
  1552.    order bits of CL and the 8 bits in CH (low order 8 bits of track):
  1553.  
  1554.     │F│E│D│C│B│A│9│8│7│6│5-0│  CX (cylinder value 0-1023 dec.)
  1555.      │ │ │ │ │ │ │ │ │ │  └─────  unused
  1556.      │ │ │ │ │ │ │ │ └─┴───────  high order 2 bits of track/cylinder
  1557.      └─┴─┴─┴─┴─┴─┴─┴──────────  low order 8 bits of track/cyl number
  1558.  
  1559.  - see   INT 13,STATUS   INT 13,17
  1560.  
  1561. :int 13,6
  1562. ^INT 13,6 - Format Track and Set Bad Sector Flags (XT & portable)
  1563.  
  1564.  AH = 06
  1565.  AL = Interleave value (XT only)
  1566.  BX = format buffer, size = 512 bytes;  the first
  1567.       2*(sectors/track) bytes contain F,N for each sector
  1568.       F = 00h for good sector,
  1569.       F = 80h for bad sector
  1570.       N = sector number
  1571.  
  1572.  
  1573.  on return:
  1574.  AH = status  (see INT 13,STATUS)
  1575.  CF = 0 if successful
  1576.     = 1 if error
  1577.  
  1578.  
  1579.  - BIOS disk write attempts should reset the controller on error
  1580.  - only the disk number is checked for validity
  1581.  
  1582.  - see   INT 13,STATUS
  1583. :int 13,7
  1584. ^INT 13,7 - Format Drive Starting at Specified Track (XT & portable)
  1585.  
  1586.  AH = 07
  1587.  AL = interleave value (XT only)
  1588.  BX = format buffer, size = 512 bytes;  the first 2*(sectors/track)
  1589.       bytes contain F, N for each sector where:
  1590.  
  1591.          F = 00h for good sector
  1592.          F = 80h for bad sector
  1593.          N = sector number
  1594.  
  1595.  on return:
  1596.  AH = status  (see INT 13,STATUS)
  1597.  CF = 0 if successful
  1598.     = 1 if error
  1599.  
  1600.  
  1601.  - BIOS disk write attempts should reset the controller on error
  1602.  - only the disk number is checked for validity
  1603.  
  1604.  - see   INT 13,STATUS
  1605. :int 13,8
  1606. ^INT 13,8 - Get Current Drive Parameters (XT & newer)
  1607.  
  1608.  AH = 08
  1609.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1610.  
  1611.  
  1612.  on return:
  1613.  AH = status  (see INT 13,STATUS)
  1614.  BL = CMOS drive type
  1615.       01 - 5¼  360K           03 - 3½  720K
  1616.       02 - 5¼  1.2Mb          04 - 3½ 1.44Mb
  1617.  CH = cylinders (0-1023 dec. see below)
  1618.  CL = sectors per track  (see below)
  1619.  DH = number of sides (0 based)
  1620.  DL = number of drives attached
  1621.  ES:DI = pointer to 11 byte Disk Base Table (DBT)
  1622.  CF = 0 if successful
  1623.     = 1 if error
  1624.  
  1625.  
  1626. %Cylinder and Sectors Per Track Format
  1627.  
  1628.  │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  CX
  1629.   │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴─┴──  sectors per track
  1630.   │ │ │ │ │ │ │ │ └─┴──────────  high order 2 bits of cylinder count
  1631.   └─┴─┴─┴─┴─┴─┴─┴──────────  low order 8 bits of cylinder count
  1632.  
  1633.  - the track/cylinder number is a 10 bit value taken from the 2 high
  1634.    order bits of CL and the 8 bits in CH (low order 8 bits of track)
  1635.  - many good programming references indicate this function is only
  1636.    available on the AT, PS2 and later systems, but all hard disk
  1637.    systems since the XT have this function available
  1638.  - only the disk number is checked for validity
  1639.  
  1640.  - see   INT 13,STATUS   DBT
  1641.  
  1642. :int 13,9
  1643. ^INT 13,9 - Initialize Fixed Disk Table (XT & newer)
  1644.  
  1645.  AH = 09
  1646.  DL = fixed disk number  (80h=drive 0, 81h=drive 1)
  1647.  
  1648.  
  1649.  on return:
  1650.  AH = status  (see INT 13,STATUS)
  1651.  CF = 0 if successful
  1652.     = 1 if error
  1653.  
  1654.  
  1655.  - sets specified fixed disk table to the default values from ROM
  1656.  - many good programming references indicate this function is only
  1657.    available on the AT, PS2 and later systems, but all hard disk
  1658.    systems since the XT have this function available
  1659.  - int 41h vector is pointer to table for drive 0
  1660.  - int 46h vector is pointer to table for drive 1
  1661.  
  1662.  
  1663. ^Table  definitions located by interrupt vectors  41H & 46H
  1664.  
  1665. %Offset Size         Description
  1666.  
  1667.    00   word  maximum number of cylinders
  1668.    02   byte  maximum number of heads
  1669.    03   word  starting reduced write current cylinder
  1670.    05   word  starting write pre-comp cylinder
  1671.    07   byte  maximum ECC data burst length
  1672.    08   byte  control byte:
  1673.  
  1674.  
  1675.    │7│6│5│4│3│2│1│0│  Control byte
  1676.     │ │ │ │ │ └─┴─┴──── drive option
  1677.     │ │ └─┴─┴───────── always zero
  1678.     │ └────────────── disable ECC retries
  1679.     └─────────────── disable access retires
  1680.  
  1681.  
  1682.  - see    INT 13,STATUS
  1683.  
  1684. :int 13,a
  1685. ^INT 13,A - Read Long Sector (XT & newer)
  1686.  
  1687.  AH = 0A
  1688.  AL = number of sectors  (1-121 dec.)
  1689.  CH = track number  (0-1023 dec., see below)
  1690.  CL = sector number  (1-17 dec., see below)
  1691.  DH = head number  (0-15 dec.)
  1692.  DL = fixed drive number  (80h=drive 0, 81h=drive 1)
  1693.  ES:BX = address of buffer
  1694.  
  1695.  
  1696.  on return:
  1697.  AH = status  (see INT 13,STATUS)
  1698.  AL = number of sectors actually transferred
  1699.  CF = 0 if successful
  1700.     = 1 if error
  1701.  
  1702.  
  1703.  - BIOS disk reads should be retried at least three times and the
  1704.    controller should be reset upon error detection
  1705.  - many good programming references indicate this function is only
  1706.    available on the AT, PS2 and later systems, but all hard disk
  1707.    systems since the XT have this function available
  1708.  - reads regular data sectors (128-1024 bytes) with an additional
  1709.    4 byte ECC code included
  1710.  - a DMA boundary error will occur if the buffer at ES:BX crosses
  1711.    a 64K segment boundary
  1712.  - only the disk number is checked for validity
  1713.  - the parameters in CX change depending on the number of cylinders;
  1714.    the track/cylinder number is a 10 bit value taken from the 2 high
  1715.    order bits of CL and the 8 bits in CH (low order 8 bits of track):
  1716.  
  1717.    │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  CX
  1718.     │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴─┴────  sector number
  1719.     │ │ │ │ │ │ │ │ └─┴────────────  high order 2 bits of track number
  1720.     └─┴─┴─┴─┴─┴─┴─┴────────────  low order 8 bits of track number
  1721.  
  1722.  - see   INT 13,STATUS   INT 13,2
  1723.  
  1724. :int 13,b
  1725. ^INT 13,B - Write Long Sectors (XT & newer)
  1726.  
  1727.  AH = 0B
  1728.  AL = number of sectors  (1-121 dec.)
  1729.  CH = track number  (0-1023 dec., see below)
  1730.  CL = sector number  (1-17 dec., see below)
  1731.  DH = head number  (0-15 dec.)
  1732.  DL = fixed drive number  (80h=drive 0, 81h=drive 1)
  1733.  ES:BX = address of buffer
  1734.  
  1735.  
  1736.  on return:
  1737.  AL = number of sectors actually transferred
  1738.  AH = status  (see INT 13,STATUS)
  1739.  CF = 0 if successful
  1740.     = 1 if error
  1741.  
  1742.  
  1743.  - BIOS disk write attempts should reset the controller on error
  1744.  - many good programming references indicate this function is only
  1745.    available on the AT, PS2 and later systems, but all hard disk
  1746.    systems since the XT have this function available
  1747.  - writes regular sectors (128-1024 bytes) with additional 4 byte
  1748.    ECC code included in data
  1749.  - a DMA boundary error will occur if the buffer at ES:BX crosses
  1750.    a 64K segment boundary
  1751.  - only the disk number is checked for validity
  1752.  - the parameters in CX change depending on the number of cylinders;
  1753.    the track/cylinder number is a 10 bit value taken from the 2 high
  1754.    order bits of CL and the 8 bits in CH (low order 8 bits of track):
  1755.  
  1756.    │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  CX
  1757.     │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴─┴────  sector number
  1758.     │ │ │ │ │ │ │ │ └─┴────────────  high order 2 bits of track number
  1759.     └─┴─┴─┴─┴─┴─┴─┴────────────  low order 8 bits of track number
  1760.  
  1761.  - see   INT 13,STATUS   INT 13,3
  1762.  
  1763. :int 13,c
  1764. ^INT 13,C - Seek to Cylinder (XT & newer)
  1765.  
  1766.  AH = 0C
  1767.  CH = low order byte of cylinder number (see below)
  1768.  CL = high order byte of cylinder number (see below)
  1769.  DH = head number (0-15)
  1770.  DL = fixed drive number (80h=drive 0, 81h=drive 1)
  1771.  
  1772.  
  1773.  on return:
  1774.  AH = status  (see INT 13,STATUS)
  1775.  CF = 0 if successful
  1776.     = 1 if error
  1777.  
  1778.  
  1779.  - many good programming references indicate this function is only
  1780.    available on the AT, PS2 and later systems, but all hard disk
  1781.    systems since the XT have this function available
  1782.  - notice that CX is in reverse byte format similar to the way data
  1783.    is stored in memory and reverse of normal register storage
  1784.  - only the disk number is checked for validity
  1785.  - the parameters in CX change depending on the number of cylinders;
  1786.    the track/cylinder number is a 10 bit value taken from the 2 high
  1787.    order bits of CL and the 8 bits in CH (low order 8 bits of track):
  1788.  
  1789.    │F│E│D│C│B│A│9│8│7│6│5-0│  CX
  1790.     │ │ │ │ │ │ │ │ │ │  └─────  unused
  1791.     │ │ │ │ │ │ │ │ └─┴───────  high order 2 bits of track number
  1792.     └─┴─┴─┴─┴─┴─┴─┴──────────  low order 8 bits of track number
  1793.  
  1794.  - see   INT 13,STATUS
  1795.  
  1796. :int 13,d
  1797. ^INT 13,D - Alternate Disk Reset  (XT & newer)
  1798.  
  1799.  AH = 0D
  1800.  DL = fixed drive number  (80h=drive 0, 81h=drive 1)
  1801.  
  1802.  
  1803.  on return:
  1804.  AH = status  (see INT 13,STATUS)
  1805.  CF = 0 if successful
  1806.     = 1 if error
  1807.  
  1808.  
  1809.  - many good programming references indicate this function is only
  1810.    available on the AT, PS2 and later systems, but all hard disk
  1811.    systems since the XT have this function available
  1812.  - used to force drive recalibration similar to INT 13,0
  1813.  - drive heads are positioned at track zero
  1814.  
  1815.  - see   INT 13,STATUS   INT 13,0
  1816.  
  1817. :int 13,e
  1818. ^INT 13,E - Read Sector Buffer (XT & portable only)
  1819.  
  1820.  
  1821.  AH = 0E
  1822.  
  1823.  
  1824.  on return:
  1825.  AL = number of sectors actually transferred
  1826.  AH = status  (see INT 13,STATUS)
  1827.  CF = 0 if successful
  1828.     = 1 if error
  1829.  
  1830.  
  1831.  - see INT 13,STATUS for controller error codes
  1832.  
  1833. :int 13,f
  1834. ^INT 13,F - Write Sector Buffer (XT & portable only)
  1835.  
  1836.  
  1837.  AH = 0F
  1838.  
  1839.  
  1840.  on return:
  1841.  AL = number of sectors actually transferred
  1842.  AH = status  (see INT 13,STATUS)
  1843.  CF = 0 if successful
  1844.     = 1 if error
  1845.  
  1846.  
  1847.  - see INT 13,STATUS for controller error codes
  1848.  
  1849. :int 13,10
  1850. ^INT 13,10 - Test for Drive Ready (XT  & newer)
  1851.  
  1852.  
  1853.  AH = 10h
  1854.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1855.  
  1856.  
  1857.  on return:
  1858.  AH = status  (see INT 13,STATUS)
  1859.  CF = 0 if successful
  1860.     = 1 if error
  1861.  
  1862.  
  1863.  - many good programming references indicate this function is only
  1864.    available on the AT, PS2 and later systems, but all hard disk
  1865.    systems since the XT have this function available
  1866.  - see INT 13,STATUS for controller error codes
  1867.  
  1868. :int 13,11
  1869. ^INT 13,11 - Recalibrate Drive (XT & newer)
  1870.  
  1871.  
  1872.  AH = 11h
  1873.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1874.  
  1875.  
  1876.  on return:
  1877.  AH = status  (see INT 13,STATUS)
  1878.  CF = 0 if successful
  1879.     = 1 if error
  1880.  
  1881.  
  1882.  - many good programming references indicate this function is only
  1883.    available on the AT, PS2 and later systems, but all hard disk
  1884.    systems since the XT have this function available
  1885.  
  1886.  - see INT 13,STATUS for controller error codes
  1887.  
  1888. :int 13,12
  1889. ^INT 13,12 - Controller RAM Diagnostic (XT & portable only)
  1890.  
  1891.  
  1892.  AH = 12h
  1893.  
  1894.  
  1895.  on return:
  1896.  AH = status  (see INT 13,STATUS)
  1897.  CF = 0 if successful
  1898.     = 1 if error
  1899.  
  1900.  
  1901.  - see INT 13,STATUS for controller error codes
  1902.  
  1903. :int 13,13
  1904. ^INT 13,13 - Drive Diagnostic (XT & portable only)
  1905.  
  1906.  
  1907.  AH = 13h
  1908.  
  1909.  
  1910.  on return:
  1911.  AH = status  (see INT 13,STATUS)
  1912.  CF = 0 if successful
  1913.     = 1 if error
  1914.  
  1915.  
  1916.  - see INT 13,STATUS for controller error codes
  1917.  
  1918. :int 13,14
  1919. ^INT 13,14 - Controller Internal Diagnostic (XT & newer)
  1920.  
  1921.  
  1922.  AH = 14h
  1923.  
  1924.  
  1925.  on return:
  1926.  AH = status  (see INT 13,STATUS)
  1927.  CF = 0 if successful
  1928.     = 1 if error
  1929.  
  1930.  
  1931.  - many good programming references indicate this function is only
  1932.    available on the AT, PS2 and later systems, but all hard disk
  1933.    systems since the XT have this function available
  1934.  - not valid on PS2 model 30
  1935.  
  1936.  - see INT 13,STATUS for controller error codes
  1937.  
  1938. :int 13,15
  1939. ^INT 13,15 - Read DASD Type (XT BIOS from 1/10/86 & newer)
  1940.  
  1941.  AH = 15h
  1942.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1943.  
  1944.  
  1945.  on return:
  1946.  AH = 00 drive not present
  1947.     = 01 diskette, no change detection present
  1948.     = 02 diskette, change detection present
  1949.     = 03 fixed disk present
  1950.  CX:DX = number of fixed disk sectors; if 3 is returned in AH
  1951.  CF = 0 if successful
  1952.     = 1 if error
  1953.  
  1954.  
  1955.  - XT's must have a BIOS date 1/10/86 or newer
  1956.  - used to determine if INT 13,16 can detect disk change
  1957.  
  1958.  - see   INT 13,STATUS   INT 13,16
  1959. :int 13,16
  1960. ^INT 13,16 - Change of Disk Status (XT BIOS from 1/10/86 & newer)
  1961.  
  1962.  
  1963.  AH = 16h
  1964.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1965.  
  1966.  
  1967.  on return:
  1968.  AH = 00 no disk change
  1969.     = 01 disk changed
  1970.  CF = set if disk has been removed or an error occurred
  1971.  
  1972.  
  1973.  - used to detect if a disk change has occurred
  1974.  - see   INT 13,STATUS   INT 13,15
  1975.  
  1976. :int 13,17
  1977. ^INT 13,17 - Set DASD Type for Format (XT BIOS from 1/10/86 & newer)
  1978.  
  1979.  
  1980.  AH = 17h
  1981.  AL = 00 no disk
  1982.     = 01  320k/360k diskette in 320k/360k drive
  1983.     = 02  320k/360k diskette in 1.2Mb drive
  1984.     = 03  1.2Mb diskette in 1.2Mb drive
  1985.     = 04  720k diskette in 720k drive  (BIOS 6/10/85 & newer)
  1986.           720K diskette in 1.44Mb drive (PS2)
  1987.           1.44Mb diskette in 1.44Mb drive (PS2)
  1988.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  1989.  
  1990.  
  1991.  returns nothing
  1992.  
  1993.  
  1994.  - only the disk number is checked for validity
  1995.  - tells BIOS format routine about the disk type
  1996.  
  1997. :int 13,18
  1998. ^INT 13,18 - Set Media Type for Format (BIOS date specific)
  1999.  
  2000.  
  2001.  AH = 18h
  2002.  CH = lower 8 bits of number of tracks  (0-1023 dec., see below)
  2003.  CL = sectors per track (1-17 dec., see below)
  2004.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  2005.  
  2006.  
  2007.  on return:
  2008.  ES:DI = pointer to 11-byte Disk Base Table (DBT)
  2009.  AH = 00h if requested combination supported
  2010.     = 01h if function not available
  2011.     = 0Ch if not supported or drive type unknown
  2012.     = 80h if there is no media in the drive
  2013.  CF = 0 if successful
  2014.     = 1 if error
  2015.  
  2016.  
  2017.  - valid only for XT BIOS dated after 1/10/86, AT after 11/15/86,
  2018.    XT 286 and the PS2 line
  2019.  - only disk number is checked for validity
  2020.  - track number is a 10 bit value taken from the 2 high order
  2021.    bits of CL and the 8 bits in CH (low order 8 bits of track):
  2022.  
  2023.    │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  CX
  2024.     │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴─┴────  sectors per track count
  2025.     │ │ │ │ │ │ │ │ └─┴────────────  high order 2 bits track/cyl count
  2026.     └─┴─┴─┴─┴─┴─┴─┴────────────  low order 8 bits of track/cyl count
  2027.  
  2028.  - see   DBT   DISK BASE TABLE   INT 13,STATUS
  2029.  
  2030. :int 13,19
  2031. ^INT 13,19 - Park Fixed Disk Heads (AT & newer)
  2032.  
  2033.  
  2034.  AH = 19h
  2035.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  2036.  
  2037.  
  2038.  on return:
  2039.  AH = status  (see INT 13,STATUS)
  2040.  CF = 0 if successful
  2041.     = 1 if error
  2042.  
  2043.  
  2044.  - available only on AT, XT 283 and PS2 machines
  2045.  
  2046.  - see INT 13,STATUS
  2047.  
  2048. :int 13,1a
  2049. ^INT 13,1A - Format Unit (PS2 model 50+)
  2050.  
  2051.  AH = 1Ah
  2052.  AL = defect table count
  2053.  DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
  2054.  ES:BX = far pointer to defect table
  2055.  CL = modifier bits
  2056.  
  2057.     │7│6│5│4│3│2│1│0│  Format Unit Modifier Bits
  2058.      │ │ │ │ │ │ │ └──── 1=ignore primary defect map, 0=use map
  2059.      │ │ │ │ │ │ └───── 1=ignore secondary defect map, 0=use map
  2060.      │ │ │ │ │ └────── 1=update secondary defect map, 0=don't
  2061.      │ │ │ │ └─────── 1=do extended surface analysis, 0=don't
  2062.      │ │ │ └──────── 1=periodic interrupt status on, 0=off
  2063.      └─┴─┴───────── reserved
  2064.  
  2065.  returns nothing
  2066.  
  2067.  - only the disk number is checked for validity
  2068.  
  2069.  - see   INT 13,STATUS
  2070. :int 14:bios serial services:bios communications:int 14,status
  2071. ^INT 14 - BIOS Asynchronous Communications Services
  2072.  
  2073. %Function requested in AH; see also  INT 14,N  where N is:
  2074.  
  2075.     0 - Initialize serial port parameters  (see INT 14,0)
  2076.     1 - Send character in AL  (see INT 14,1)
  2077.     2 - Receive character in AL  (see INT 14,2)
  2078.     3 - Get Serial port status  (see INT 14,3)
  2079.     4 - Extended initialize  (PS2) (see INT 14,4)
  2080.     5 - Extended communication port control (PS2) (see INT 14,5)
  2081.  
  2082.  
  2083.  - all functions have:
  2084.    AH = function number
  2085.    AL = character to send or receive
  2086.    DX = zero based RS232 card number
  2087.  - these functions use hardware flow control
  2088.  - used by DOS MODE to redirect LPTx output to a serial device
  2089.  - see individual functions for more data.
  2090.  
  2091.  
  2092. ^BIOS Asynchronous Communications Services (Status)
  2093.  
  2094.  │7│6│5│4│3│2│1│0│  AL  modem status
  2095.   │ │ │ │ │ │ │ └──── clear to send status changed
  2096.   │ │ │ │ │ │ └───── data set ready status changed
  2097.   │ │ │ │ │ └────── trailing edge ring indicator
  2098.   │ │ │ │ └─────── receive line signal changed
  2099.   │ │ │ └──────── clear to send
  2100.   │ │ └───────── data set ready
  2101.   │ └────────── ring indicator
  2102.   └─────────── receive line signal detected
  2103.  
  2104.  │7│6│5│4│3│2│1│0│  AH  port status
  2105.   │ │ │ │ │ │ │ └──── data ready
  2106.   │ │ │ │ │ │ └───── overrun error
  2107.   │ │ │ │ │ └────── parity error
  2108.   │ │ │ │ └─────── framing error
  2109.   │ │ │ └──────── break detect
  2110.   │ │ └───────── transmit holding register empty
  2111.   │ └────────── transmit shift register empty
  2112.   └─────────── time out (N/A for functions 1 and 2)
  2113.  
  2114. :int 14,0
  2115. ^INT 14,0 - Initialize Communications Port Parameters
  2116.  
  2117.  AH = 00
  2118.  AL = parms for initialization (see tables below)
  2119.  DX = zero based serial port number (0-1) (0-3 for AT)
  2120.  
  2121.  │7│6│5│4│3│2│1│0│  AL                      Parity (bits 4 & 3)
  2122.   │ │ │ │ │ │ └─┴──── word length bits          00 = none
  2123.   │ │ │ │ │ └─────── stop bits flag             01 = odd
  2124.   │ │ │ └─┴──────── parity bits                 10 = none
  2125.   └─┴─┴─────────── baud rate bits               11 = even
  2126.  
  2127. %Word length (bits 1 & 0)            Stop bit count (bit 2)
  2128.  
  2129.     10 = 7 bits                        0 = 1 stop bit
  2130.     11 = 8 bits                        1 = 2 stop bits
  2131.  
  2132. %Baud rate (bits 7, 6 & 5)
  2133.  
  2134.  000 = 110 baud      100 = 1200 baud
  2135.  001 = 150 baud      101 = 2400 baud
  2136.  010 = 300 baud      110 = 4800 baud
  2137.  011 = 600 baud      111 = 9600 baud (4800 on PCjr)
  2138.  
  2139.  
  2140.  on return:
  2141.  AH = port status
  2142.  AL = modem status
  2143.  
  2144.  
  2145.  - for status bits see INT 14,STATUS
  2146.  
  2147. :int 14,1
  2148. ^INT 14,1 - Send Character to Communications Port
  2149.  
  2150.  
  2151.  AH = 01
  2152.  AL = character to send
  2153.  DX = zero based serial port number (0-1) (0-3 for AT)
  2154.  
  2155.  
  2156.  on return:
  2157.  AH = port status  (see INT 14,STATUS)
  2158.       bit 7=0 indicates success
  2159.       bit 7=1 indicates error, bits 0-6 indicate cause
  2160.  
  2161.  
  2162.  - INT 14 service 3 should be used to determine the actual
  2163.    cause of the error since the time-out bit of the status
  2164.    register is always set during an error on this call
  2165.  - uses hardware flow control
  2166.  - for status bits see INT 14,STATUS
  2167.  
  2168. :int 14,2
  2169. ^INT 14,2 - Receive Character from Communications Port
  2170.  
  2171.  AH = 02
  2172.  DX = zero based serial port number (0-1) (0-3 for AT)
  2173.  
  2174.  
  2175.  on return:
  2176.  AH = port status  (see INT 14,STATUS)
  2177.       bit 7 = 0 if successful
  2178.       bit 7 = 1 if call failed
  2179.  AL = character received if call was success
  2180.  
  2181.  
  2182.  - INT 14 service 3 should be used to determine the actual
  2183.    cause of the error since the time-out bit of the status
  2184.    register is always set during an error on this call
  2185.  - uses hardware flow control
  2186.  
  2187.  - for status bits see INT 14,STATUS
  2188.  
  2189. :int 14,3
  2190. ^INT 14,3 - Get Serial Port Status
  2191.  
  2192.  
  2193.  AH = 03
  2194.  DX = zero based serial port number (0-1) (0-3 for AT)
  2195.  
  2196.  
  2197.  on return:
  2198.  AH = port status
  2199.  AL = modem status
  2200.  
  2201.  
  2202.  - the status check performs a poll of the port and does not
  2203.    perform character I/O
  2204.  
  2205.  - for status bits see  INT 14,STATUS
  2206.  
  2207. :int 14,4
  2208. ^INT 14,4 - Serial Port Extended Initialization (PS2 only)
  2209.  
  2210.  AH = 04
  2211.  AL = break setting
  2212.  BH = parity setting
  2213.  BL = stop bit setting
  2214.  CH = word length setting
  2215.  CL = baud rate setting
  2216.  DX = zero based serial port number (0-3)
  2217.  
  2218. %                 --- Break Setting ---
  2219.                        1 = break
  2220.                        0 = no break
  2221.  
  2222. %----- Parity Setting -----        --- Stop Bit Setting ---
  2223.  
  2224.     0 = no parity                   0 = one stop bit
  2225.     1 = odd parity                  1 = 2 stop bits
  2226.     2 = even parity                     1½ if register CH=0
  2227.     3 = stick parity odd                (5 bit word length)
  2228.     4 = stick parity even
  2229.  
  2230. %-- Word Length Setting --       ---- Baud rate Setting ----
  2231.  
  2232.         0 = 5 bits                 0 = 110       5 = 2400
  2233.         1 = 6 bits                 1 = 150       6 = 4800
  2234.         2 = 7 bits                 2 = 300       7 = 9600
  2235.         3 = 8 bits                 3 = 600       8 = 19200
  2236.                                    4 = 1200
  2237.  
  2238.  on return:
  2239.  AH = port status
  2240.  AL = modem status
  2241.  
  2242.  
  2243.  - for status bits see INT 14,STATUS
  2244.  
  2245. :int 14,5
  2246. ^INT 14,5 - Extended Communication Port Control  (PS2 only)
  2247.  
  2248.  AH = 05
  2249.  AL = read or write modem control register
  2250.     = 00 read modem control register
  2251.     = 01 read modem control register
  2252.  DX = zero based serial port number (0-1) (0-3 for AT)
  2253.  
  2254.  BL = modem control register
  2255.  
  2256.       │7│6│5│4│3│2│1│0│  BL
  2257.        │ │ │ │ │ │ │ └──── 1 = activate data terminal ready
  2258.        │ │ │ │ │ │ └───── 1 = activate request to send
  2259.        │ │ │ │ │ └────── OUT1
  2260.        │ │ │ │ └─────── OUT2
  2261.        │ │ │ └──────── 0 = normal, 1 = loopback test
  2262.        └─┴─┴───────── reserved, forced to zero
  2263.  
  2264.  on return:
  2265.  AH = port status,  see INT 14,STATUS
  2266.  AL = modem status,  see INT 14,STATUS
  2267.  BL = UART modem control register, see UART
  2268.  
  2269. :int 15:bios system services:system interrupts
  2270. ^INT 15 - System BIOS Services
  2271.  
  2272. %Function requested in AH; see also  INT 15,N  where N is:
  2273.  
  2274.      0 - Turn cassette motor on (PC,PCjr only)
  2275.      1 - Turn cassette motor off (PC,PCjr only)
  2276.      2 - Read blocks from cassette (PC,PCjr only)
  2277.      3 - Write blocks to cassette (PC,PCjr only)
  2278.      F - PS2 format periodic interrupt (PS2 only)
  2279.     21 - PS2 power on self test (PS2 except 30)
  2280.     40 - Read / modify profiles (convertible only)
  2281.     41 - Wait on external event (convertible only)
  2282.     42 - Request system power off (convertible only)
  2283.     43 - Read system status (convertible only)
  2284.     44 - (De)activate internal modem power (convertible)
  2285.     4F - Keyboard intercept  (BIOS date specific)
  2286.     80 - Device open
  2287.     81 - Device close
  2288.     82 - Program termination
  2289.     83 - Event wait
  2290.     84 - Joy-Stick support
  2291.     85 - System request key pressed
  2292.     86 - Elapsed time wait (AT and after)
  2293.     87 - Move block to/from extended memory
  2294.     88 - Extended memory size determination
  2295.     89 - Switch processor to protected mode
  2296.     90 - Device busy
  2297.     91 - Interrupt complete
  2298.     C0 - Return system configuration parameters (PS2 only)
  2299.     C1 - Return extended BIOS data address (PS2 only)
  2300.     C2 - Pointing device BIOS interface (PS2 only)
  2301.     C3 - Enable/Disable watchdog timer
  2302.     C4 - Programmable option select
  2303.  
  2304.  
  2305.  - CF is set and AX is left unchanged if function isn't supported
  2306.  - some Tandy BIOS's fail to restore interrupts on return from INT 15
  2307.  
  2308. :int 15,0
  2309. ^INT 15,0 - Turn Cassette Motor On (PC,PCjr only)
  2310.  
  2311.  
  2312.  AH = 00
  2313.  
  2314.  
  2315.  - all programs using the cassette must actually turn on
  2316.    the device before use
  2317.  - there is a noticeable delay between turn-on and device ready
  2318.  - a noticeable clicking noise can be heard by switching the
  2319.    cassette on and off
  2320.  
  2321.  - see INT 15,1
  2322.  
  2323. :int 15,1
  2324. ^INT 15,1 - Turn Cassette Motor Off (PC,PCjr only)
  2325.  
  2326.  
  2327.  AH = 01
  2328.  
  2329.  
  2330.  - all programs using the cassette should turn off
  2331.    the device after use
  2332.  - a noticeable clicking noise can be heard by switching the
  2333.    cassette on and off
  2334.  
  2335.  - see  INT 15,0
  2336.  
  2337. :int 15,2
  2338. ^INT 15,2 - Read Blocks from Cassette (PC,PCjr only)
  2339.  
  2340.  AH = 02
  2341.  CX = count of bytes to read
  2342.  ES:BX = pointer to data buffer
  2343.  
  2344.  
  2345.  on return:
  2346.  
  2347.  AH = error code if CF=1
  2348.     = 1  if CRC error
  2349.     = 2  data transition lost, (bit signal scrambled)
  2350.     = 3  no data found on tape
  2351.  
  2352.  DX = count of bytes actually read
  2353.  ES:BX = pointer to byte following last byte read
  2354.  
  2355.  
  2356.  - data is transferred in 256 byte blocks, though only the
  2357.    number of bytes requested are actually stored
  2358.  
  2359. :int 15,3
  2360. ^INT 15,3 - Write Blocks to Cassette (PC,PCjr only)
  2361.  
  2362.  
  2363.  AH = 03
  2364.  CX = count of bytes to write
  2365.  ES:BX = pointer to data buffer
  2366.  
  2367.  
  2368.  on return:
  2369.  
  2370.  CX = zero
  2371.  ES:BX = pointer to byte following last byte written
  2372.  
  2373.  
  2374.  - data is actually written in 256 byte blocks
  2375.  - if CX is less than 256, then the block is padded
  2376.  - no error detection/correction is available for writing
  2377.  
  2378. :int 15,f
  2379. ^INT 15,F - Format Periodic Interrupt (PS2 only)
  2380.  
  2381.  AH = 0F
  2382.  AL = phase code
  2383.     = 00  reserved
  2384.     = 01  surface analysis
  2385.     = 02  formatting
  2386.  
  2387.  on return:
  2388.  CF = 0 continue formatting/scanning
  2389.     = 1 end of format/scanning
  2390.  
  2391.  - after formatting/scanning each cylinder the formatting
  2392.    routine calls this interrupt
  2393.  - may be used by a program to gain control after formatting
  2394.    a cylinder
  2395.  - if invoked from a non-PS2 CF=1 and AH contains the following
  2396.    AH = 80h  for PC and PCjr
  2397.       = 86h  on most other machines
  2398.  
  2399.  
  2400. :int 15,21
  2401. ^INT 15,21 - Power On Self Test (POST) Error Log  (PS2 except 30)
  2402.  
  2403.  AH = 21h
  2404.  AL = 00 read POST error log
  2405.     = 01 write error code to POST error log
  2406.  BH = Device code  (if write)
  2407.  BL = Device error  (if write)
  2408.  
  2409.  on return
  2410.  CF = 0 if successful
  2411.     = 1 if in error (AH contains code)
  2412.  
  2413. %if reading POST error log:
  2414.     AH = 00h if successful
  2415.        = 80h (PCjr and PC)        = 86h for all other machines
  2416.     BX = number of POST error codes stored
  2417.     ES:DI pointer to POST error log
  2418.  
  2419. %if writing POST error log:
  2420.     AH = 00h if successful        = 01 POST error log full
  2421.        = 80h (PCjr and PC)        = 86h for all other machines
  2422. :int 15,40
  2423. ^INT 15,40 - Read / Modify Profiles (convertible only)
  2424.  
  2425.  
  2426.  AH = 40h
  2427.  
  2428.  AL = 00 - return system profile in cx,bx
  2429.       01 - modify system profile
  2430.       CX,BX = profile info
  2431.  
  2432.  
  2433.  AL = 02 - return internal modem profile in BX
  2434.  
  2435.  
  2436.  AL = 03 - modify internal modem profile
  2437.       BX = profile info
  2438.  
  2439. :int 15,41
  2440. ^INT 15,41 - Wait on External Event (convertible only)
  2441.  
  2442.  AH = 41h
  2443.  AL = condition type:
  2444.  
  2445.   │7│6│5│4│3│2│1│0│  AL
  2446.    │ │ │ │ │ └─┴─┴──── conditions (codes) to wait for
  2447.    │ │ │ │ └───────── reserved
  2448.    │ │ │ └────────── 1=port address/0=user byte
  2449.    └─┴─┴─────────── reserved
  2450.  
  2451. %Condition codes:
  2452.  
  2453.       0 = any external event
  2454.       1 = compare and return if equal
  2455.       2 = compare and return if not equal
  2456.       3 = test and return if not zero
  2457.       4 = test and return if zero
  2458.  
  2459.  BH = condition compare or mask value
  2460.  BL = time-out value times 55 ms, 0 if no time limit
  2461.  DX = I/O port address (if AL bit 4 = 1)
  2462.  ES:DI = pointer to user byte (if AL bit 4 = 0)
  2463.  
  2464. :int 15,42
  2465. ^INT 15,42 - Request System Power Off (convertible only)
  2466.  
  2467.  
  2468.  AH = 42h
  2469.  
  2470.  AL = 00 to use system profile
  2471.     = 01 to force suspend regardless of profile
  2472.  
  2473. :int 15,43
  2474. ^INT 15,43 - Read System Status (convertible only)
  2475.  
  2476.  
  2477.  AH = 43h
  2478.  
  2479.  
  2480.  on return
  2481.  AL = STATUS:
  2482.  
  2483.    │7│6│5│4│3│2│1│0│  AL
  2484.     │ │ │ │ │ │ │ └──── LCD detached
  2485.     │ │ │ │ │ │ └───── reserved
  2486.     │ │ │ │ │ └────── RS232/parallel powered on
  2487.     │ │ │ │ └─────── internal modem powered on
  2488.     │ │ │ └──────── power activated by alarm
  2489.     │ │ └───────── standby power lost
  2490.     │ └────────── external power in use
  2491.     └─────────── battery low
  2492.  
  2493. :int 15,44
  2494. ^INT 15,44 - (De)activate Internal Modem Power (convertible)
  2495.  
  2496.  
  2497.  AH = 44h
  2498.  
  2499.  AL = 00 to power off
  2500.     = 01 to power on
  2501.  
  2502. :int 15,4f
  2503. ^INT 15,4F - Keyboard Intercept  (BIOS date specific)
  2504.  
  2505.  AH = 4F
  2506.  AL = scan code
  2507.  CF = set to 1 (via STC instruction)
  2508.  
  2509.  on return
  2510.  
  2511.  AH = 80h, CF set  (PC, PCjr)
  2512.     = 86h, CF set  (XT BIOS 11/8/82, AT BIOS 1/10/84)
  2513.  AL = CF set, new scan code
  2514.     = CF clear, original scancode
  2515.  
  2516.  
  2517.  - available with XT BIOS after 11/8/82, AT BIOS after 1/10/84
  2518.  - called by INT 9, makes allowance for keyboard translation
  2519.  - normally returns the scan code in AL, with CF set
  2520.  - if function returns with CF clear, INT 9 ignores keystroke
  2521.  - do not rely on this function being called for each INT 9 since
  2522.    any user INT 9 handler can exit prematurely and circumvent
  2523.    this function
  2524. :int 15,80
  2525. ^INT 15,80 - Device Open
  2526.  
  2527.  
  2528.  AH = 80h
  2529.  BX = device id
  2530.  CX = process id
  2531.  
  2532.  
  2533.  on return:
  2534.  CF = 0 if successful
  2535.     = 1 if error
  2536.  AH = 80h for PC & PCjr
  2537.     = 86h for XT (BIOS after 11/8/82)
  2538.  
  2539.  
  2540.  - available on the AT, XT 286, PS2 and XT with BIOS after 11/8/82
  2541.  - designed for use in simple multitasking
  2542.  
  2543. :int 15,81
  2544. ^INT 15,81 - Device Close
  2545.  
  2546.  
  2547.  AH = 81h
  2548.  BX = device id
  2549.  CX = process id
  2550.  
  2551.  
  2552.  on return:
  2553.  CF = 0 if successful
  2554.     = 1 if error
  2555.  AH = 80h for PC & PCjr
  2556.     = 86h for XT (BIOS after 11/8/82)
  2557.  
  2558.  
  2559.  - available on the AT, XT 286, PS2 and XT with BIOS after 11/8/82
  2560.  - designed for use in simple multitasking
  2561.  
  2562. :int 15,82
  2563. ^INT 15,82 - Program Termination
  2564.  
  2565.  
  2566.  AH = 82h
  2567.  BX = device id
  2568.  
  2569.  
  2570.  on return:
  2571.  CF = 0 if successful
  2572.     = 1 if error
  2573.  AH = 80h for PC & PCjr
  2574.     = 86h for XT (BIOS after 11/8/82)
  2575.  
  2576.  
  2577.  - available on the AT, XT 286, PS2 and XT with BIOS after 11/8/82
  2578.  - designed for use in simple multitasking
  2579.  
  2580. :int 15,83
  2581. ^INT 15,83 - Event Wait
  2582.  
  2583.  
  2584.  AH = 83h
  2585.  AL = 0  set interval
  2586.     = 1  cancel interval (PS2)
  2587.  CX,DX = number of microseconds to wait (976 µs resolution)
  2588.  ES:BX = pointer to memory flag (bit 7 is set
  2589.          when interval expires)
  2590.        (granularity is 976 microseconds)
  2591.  
  2592.  
  2593.  on return:
  2594.  CF = 1 if function already busy
  2595.  AH = 80h for PC
  2596.     = 86h for XT & AT
  2597.  
  2598.  
  2599.  - available on the AT (BIOS after 1/10/84) and PS2's except 30
  2600.  - designed for use in simple multitasking
  2601.  
  2602. :int 15,84
  2603. ^INT 15,84 - Joy-Stick Support
  2604.  
  2605.  
  2606.  AH = 84h
  2607.  DX = 0 to read the current switch settings
  2608.     = 1 to read the joystick position (resistive inputs)
  2609.  
  2610.  
  2611.  on return (DX=0, read switch setting):
  2612.  CF = 0 if successful
  2613.     = 1 if error
  2614.  AH = 80h error code if CF set on PC
  2615.     = 86h error code if CF set on XT before 11/8/82
  2616.  AL = switch settings in bits 7-4 (if read switch function)
  2617.  
  2618.  on return (DX=1, read joystick position):
  2619.  AX = A(X)
  2620.  BX = A(Y)
  2621.  CX = B(X)
  2622.  DX = B(Y)
  2623.  
  2624. :int 15,85
  2625. ^INT 15,85 - System Request Key Pressed
  2626.  
  2627.  
  2628.  AH = 85h
  2629.  AL = 00 key pressed
  2630.     = 01 key released
  2631.  
  2632.  
  2633.  on return:
  2634.  CF = 0 if successful
  2635.     = 1 if error
  2636.  AH = 80h for PC or PCjr
  2637.     = 86h for XT (BIOS after 11/8/82)
  2638.  
  2639.  
  2640.  - called by BIOS when the System Request key is pressed/released
  2641.  - available on machines with newer BIOS and keyboards
  2642.  
  2643. :int 15,86
  2644. ^INT 15,86 - Elapsed Time Wait (AT and PS2)
  2645.  
  2646.  
  2647.  AH = 86h
  2648.  CX,DX = number of microseconds to wait (976 µs resolution)
  2649.  
  2650.  
  2651.  on return:
  2652.  CF = set if error (PC,PCjr,XT)
  2653.     = set if wait in progress
  2654.     = clear if successful wait
  2655.  AH = 80h for PC and PCjr
  2656.     = 86h for XT
  2657.  
  2658.  
  2659.  - AT and PS2 only for system timing
  2660.  - not designed for user application usage
  2661.  
  2662. :int 15,87
  2663. ^INT 15,87 - Move Block to/from Extended Memory
  2664.  
  2665.  AH = 87h
  2666.  CX = word count of block to be moved
  2667.  ES:SI = pointer to Global Descriptor Table (GDT)
  2668.  
  2669.  
  2670.  on return:
  2671.  CF = 0  if successful (AH contains return code)
  2672.     = 1  if error detected
  2673.  AH = 0  operation successful (ZF also set)
  2674.     = 1  RAM parity error  (if CF set)
  2675.     = 2  other exception (if CF set)
  2676.     = 3  gate address on line 20h failed (if CF set)
  2677.     = 80h on PC and PCjr (if CF set)
  2678.     = 86h on XT and newer 808x machines (if CF set)
  2679.  
  2680.  - transfers data blocks to and from extended memory on 80286
  2681.    and 80386 machines by switching from real to protected mode
  2682.    for the duration of the transfer
  2683.  - all real mode interrupts are disabled
  2684.  - processor shuts down during the switch from protected mode
  2685.    to real mode on 286 processors
  2686.  
  2687.  - see   GDT
  2688.  
  2689. :int 15,88
  2690. ^INT 15,88 - Extended Memory Size Determination
  2691.  
  2692.  
  2693.  AH = 88h
  2694.  
  2695.  
  2696.  on return:
  2697.  CF = 80h for PC, PCjr
  2698.     = 86h for XT and Model 30
  2699.     = other machines, set for error, clear for success
  2700.  AX = number of contiguous 1k blocks of memory starting
  2701.       at address 1024k (100000h)
  2702.  
  2703.  
  2704.  - works only on 80286 and 80386 machines
  2705.  - retrieves bytes 30 and 31 from the CMOS RAM (this data is set
  2706.    by the boot memory scan
  2707.  
  2708. :int 15,89
  2709. ^INT 15,89 - Switch Processor to Protected Mode
  2710.  
  2711.  AH = 89h
  2712.  BH = IRQ8 interrupt vector offset
  2713.  BL = IRQ0 interrupt vector offset
  2714.  CX = offset into protected mode CS to jump
  2715.  ES:SI = pointer to Global Descriptor Table (GDT)
  2716.  
  2717.  
  2718.  on return:
  2719.  CF = 0 if successful
  2720.     = 1 if error
  2721.  
  2722.  - switches 286 and 386 machines into protected mode to take
  2723.    advantage of advanced feature and extended memory
  2724.  - Global descriptor table must be setup before interrupt
  2725.  - normal BIOS functions are not available after the switch
  2726.  
  2727.  
  2728.  - see   GDT
  2729. :int 15,90
  2730. ^INT 15,90 - Device Busy
  2731.  
  2732.  AH = 90h
  2733.  AL = type code:
  2734.     = 00  disk
  2735.     = 01  diskette
  2736.     = 02  keyboard
  2737.     = 03  pointing device
  2738.     = 80  network (ES:BX = NCB)
  2739.     = FC  fixed disk reset (PS2)
  2740.     = FD  diskette motor start
  2741.     = FE  printer
  2742.  ES:BX = pointer to network control block if waiting for network
  2743.  
  2744.  on return:
  2745.  CF = 0 if wait not satisfied
  2746.     = 1 if wait time satisfied
  2747.  AH = when CF set, 80h for PC & PCjr, 86h for XT (BIOS 11/8/82)
  2748.  
  2749.  - tells the OS a a program is about to wait for a device
  2750.  - used for multitasking OS development
  2751. :int 15,91
  2752. ^INT 15,91 - Interrupt Complete
  2753.  
  2754.  AH = 91h
  2755.  
  2756.  on return:
  2757.  CF = 0 if successful
  2758.     = 1 if error
  2759.  AH = when CF set, 80h for PC & PCjr, 86h for XT (BIOS 11/8/82)
  2760.  AL = type code:
  2761.     = 00  disk
  2762.     = 01  diskette
  2763.     = 02  keyboard
  2764.     = 03  pointing device
  2765.     = 80  network (ES:BX = NCB)
  2766.     = FC  fixed disk reset (PS2)
  2767.     = FD  diskette motor start
  2768.     = FE  printer
  2769.  
  2770.  - should not be used by applications software
  2771.  - used by the BIOS to indicate device interrupt is complete
  2772.  - used for multitasking OS development
  2773. :int 15,c0
  2774. ^INT 15,C0 - Return System Configuration Parameters (PS2 only)
  2775.  
  2776.  AH = C0
  2777.  
  2778.  on return:
  2779.  CF = 0 if successful
  2780.     = 1 if error
  2781.  AH = when CF set, 80h for PC & PCjr, 86h for XT
  2782.       (BIOS after 11/8/82) and AT (BIOS after 1/10/84)
  2783.  
  2784.  ES:BX = pointer to system descriptor table in ROM of the format:
  2785.  
  2786. %Offset Size          Description
  2787.  
  2788.    00   word   length of descriptor (8 minimum)
  2789.    02   byte   model byte (same as F000:FFFE, not reliable)
  2790.    03   byte   secondary model byte
  2791.    04   byte   BIOS revision level (zero based)
  2792.    05   byte   feature information, see below
  2793.    06   dword  reserved
  2794.  
  2795.  
  2796. %Feature Information
  2797.  
  2798.  │7│6│5│4│3│2│1│0│  Feature Byte
  2799.   │ │ │ │ │ │ │ └──── reserved
  2800.   │ │ │ │ │ │ └───── 0=PC bus, 1=Micro Channel
  2801.   │ │ │ │ │ └────── Extended BIOS Data Area allocated
  2802.   │ │ │ │ └─────── wait for external event supported
  2803.   │ │ │ └──────── INT 15 AH=4F used (kbd intercept)
  2804.   │ │ └───────── RTC present
  2805.   │ └────────── 2nd 8259 present
  2806.   └─────────── DMA channel 3 used by fixed disk BIOS
  2807.  
  2808.  - see   MACHINE ID
  2809.  
  2810. :int 15,c1
  2811. ^INT 15,C1 - Return Extended BIOS Data Area Segment (PS2 only)
  2812.  
  2813.  
  2814.  AH = C1
  2815.  
  2816.  
  2817.  on return:
  2818.  CF = 0 if successful
  2819.     = 1 if error
  2820.  AH = when CF set, 80h for PC & PCjr, 86h for XT (BIOS 11/8/82)
  2821.  ES = EBDA segment address if PS2
  2822.  
  2823.  
  2824.  - the EBDA is used internally by the PS2 BIOS routines
  2825.  - the EBDA is allocated at the top of user memory by the POST
  2826.    routine
  2827.  
  2828. :int 15,c2
  2829. ^INT 15,C2 - Pointing Device BIOS Interface  (PS2 only)
  2830.  
  2831.  AH = C2
  2832.  AL = 0  enable/disable pointing device (BH contains flag)
  2833.     = 1  reset pointing device
  2834.     = 2  set sample rate
  2835.     = 3  set resolution
  2836.     = 4  read device type
  2837.     = 5  pointing device initialization
  2838.     = 6  extended commands
  2839.     = 7  pointing device far call initialization
  2840.  BH = 0 indicates enable for AL = 0
  2841.     = 1 indicates disable for AL = 0
  2842.  
  2843.  
  2844.  on return:
  2845.  CF = 0 if successful
  2846.     = 1 if error
  2847.  AH = when CF set, 80h for PC & PCjr, 86h for XT, AT
  2848.     = 01  invalid function call
  2849.     = 02  invalid input
  2850.     = 03  interface error
  2851.     = 04  resend
  2852.     = 05  no far call installed
  2853.  
  2854. :int 15,c3
  2855. ^INT 15,C3 - Enable/Disable Watchdog Timer  (PS2)
  2856.  
  2857.  AH = C3
  2858.  AL = 0  disable watchdog time-out
  2859.     = 1  enable watchdog time-out
  2860.  BX = watchdog timer count (1-255)
  2861.  
  2862.  
  2863.  on return:
  2864.  CF = 0 if successful
  2865.     = 1 if error
  2866.  AH = when CF set, 80h for PC & PCjr, 86h for XT, AT & Model 30
  2867.  
  2868.  
  2869.  - the watchdog timer is available only on PS2 with 80286 and
  2870.    80386 processors.
  2871.  - the timer uses channel timer channel 3 and IRQ0.  Activated
  2872.    when IRQ0 is active for more than one channel 0 timer cycle,
  2873.    which causes the timer to be decremented.   When the watch-
  2874.    dog timer reaches 0, and NMI is generated.
  2875. :int 15,c4
  2876. ^INT 15,C4 - Programmable Option Select  (PS2)
  2877.  
  2878.  AH = C4
  2879.  AL = 0  get Programmable Option Select adapter register address
  2880.     = 1  enable slot for setup
  2881.     = 2  adapter enable
  2882.  
  2883.  
  2884.  on return:
  2885.  CF = 0 if successful
  2886.     = 1 if error
  2887.  AH = when CF set, 80h for PC & PCjr, 86h for XT, AT & 30
  2888.  BL = slot number (function AL=1)
  2889.  DL = POS adapter register address (function AL=0)
  2890.  
  2891.  
  2892.  - allows access to PS2 Programmable Option Select registers
  2893.  - available on 80286 and 80386 PS2's
  2894.  
  2895. :int 16:bios keyboard services
  2896. ^INT 16 - Keyboard BIOS Services
  2897.  
  2898.  
  2899. %Function requested in AH, see  INT 16,n  where n is:
  2900.  
  2901.     0 - Wait for keystroke and read
  2902.     1 - Get keystroke status
  2903.     2 - Get shift status
  2904.     3 - Set keyboard typematic rate (AT+)
  2905.     4 - Keyboard click adjustment (AT+)
  2906.     5 - Keyboard buffer write  (AT/PS2 enhanced keyboards)
  2907.    10 - Wait for keystroke and read  (AT/PS2 enhanced keyboards)
  2908.    11 - Get keystroke status  (AT/PS2 enhanced keyboards)
  2909.    12 - Get shift status  (AT/PS2 enhanced keyboards)
  2910.  
  2911.  
  2912.  - with IBM BIOS's, INT 16 functions do not restore the flags to
  2913.    the pre-interrupt state to allow returning of information via
  2914.    the flags register
  2915.  - functions 3 through 12h are not available on all AT machines
  2916.    unless the extended keyboard BIOS is present
  2917.  - see   SCAN CODES
  2918. :int 16,0
  2919. ^INT 16,0 - Wait for Keypress and Read Character
  2920.  
  2921.  
  2922.  AH = 00
  2923.  
  2924.  
  2925.  on return:
  2926.  AH = keyboard scan code
  2927.  AL = ASCII character or zero if special function key
  2928.  
  2929.  
  2930.  - halts program until key with a scancode is pressed
  2931.  - see  SCAN CODES
  2932.  
  2933. :int 16,1
  2934. ^INT 16,1 - Get Keyboard Status
  2935.  
  2936.  
  2937.  AH = 01
  2938.  
  2939.  
  2940.  on return:
  2941.  ZF = 0 if a key pressed (even Ctrl-Break)
  2942.  AX = 0 if no scan code is available
  2943.  AH = scan code
  2944.  AL = ASCII character or zero if special function key
  2945.  
  2946.  
  2947.  - data code is not removed from buffer
  2948.  - Ctrl-Break places a zero word in the keyboard buffer but does
  2949.    register a keypress.
  2950.  
  2951. :int 16,2
  2952. ^INT 16,2 - Read Keyboard Flags
  2953.  
  2954.  AH = 02
  2955.  
  2956.  
  2957.  on return:
  2958.  AL = BIOS keyboard flags (located in BIOS Data Area 40:17)
  2959.  
  2960.    │7│6│5│4│3│2│1│0│  AL or BIOS Data Area 40:17
  2961.     │ │ │ │ │ │ │ └──── right shift key depressed
  2962.     │ │ │ │ │ │ └───── left shift key depressed
  2963.     │ │ │ │ │ └────── CTRL key depressed
  2964.     │ │ │ │ └─────── ALT key depressed
  2965.     │ │ │ └──────── scroll-lock is active
  2966.     │ │ └───────── num-lock is active
  2967.     │ └────────── caps-lock is active
  2968.     └─────────── insert is active
  2969.  
  2970.  - see   BDA   BIOS DATA AREA
  2971.  
  2972. :int 16,3
  2973. ^INT 16,3 - Set Keyboard Typematic Rate  (AT+)
  2974.  
  2975.  AH = 03
  2976.  AL = 00  set typematic rate to default
  2977.       01  increase initial delay
  2978.       02  slow typematic rate by 1/2
  2979.       04  turn off typematic chars
  2980.       05  set typematic rate/delay
  2981.  
  2982.  BH = repeat delay (AL=5)
  2983.       0 = 250ms     2 = 750ms
  2984.       1 = 500ms     3 = 1000ms
  2985.  BL = typematic rate, one of the following  (AL=5)
  2986.  
  2987.       00 - 30.0      01 - 26.7      02 - 24.0      03 - 21.8
  2988.       04 - 20.0      05 - 18.5      06 - 17.1      07 - 16.0
  2989.       08 - 15.0      09 - 13.3      0A - 12.0      0B - 10.9
  2990.       0C - 10.0      0D - 9.2       0E - 8.6       0F - 8.0
  2991.       10 - 7.5       11 - 6.7       12 - 6.0       13 - 5.5
  2992.       14 - 5.0       15 - 4.6       16 - 4.3       17 - 4.0
  2993.       18 - 3.7       19 - 3.3       1A - 3.0       1B - 2.7
  2994.       1C - 2.5       1D - 2.3       1E - 2.1       1F - 2.0
  2995.  
  2996.  returns nothing
  2997.  
  2998.  - if the typematic rate is not within range,no action is taken
  2999.  - available on AT and PS2 machines with extended keyboard support
  3000.  - see   KEYBOARD COMMANDS
  3001. :int 16,4
  3002. ^INT 16,4 - Keyboard Click Adjustment (AT+)
  3003.  
  3004.  
  3005.  AH = 04
  3006.  AL = 1 for click on
  3007.     = 0 for click off
  3008.  
  3009.  
  3010.  - available only on AT and later machines that support the extended
  3011.    keyboard BIOS
  3012. :int 16,5
  3013. ^INT 16,5 - Keyboard Buffer Write  (AT+)
  3014.  
  3015.  
  3016.  AH = 05
  3017.  CH = scan code
  3018.  CL = ASCII character
  3019.  
  3020.  
  3021.  on return:
  3022.  AL = 00 if success
  3023.       01 if buffer full
  3024.  
  3025.  
  3026.  - available on AT and PS2 machines with extended keyboard support
  3027.  - stores normal keystroke into keyboard buffer
  3028.  - will not store attribute keys like Shift, Alt, Ctrl, etc...
  3029.  
  3030. :int 16,10
  3031. ^INT 16,10 - Extended Wait for Keypress and Read Character  (AT+)
  3032.  
  3033.  
  3034.  AH = 10h
  3035.  
  3036.  
  3037.  on return:
  3038.  AH = scan code
  3039.  AL = ASCII character or zero if special function key
  3040.  
  3041.  
  3042.  - available on AT and PS2 machines with extended keyboard support
  3043.  - similar to INT 16,0
  3044.  - see  SCAN CODES
  3045.  
  3046. :int 16,11
  3047. ^INT 16,11 - Extended Get Keyboard Status  (AT+)
  3048.  
  3049.  
  3050.  AH = 11h
  3051.  
  3052.  
  3053.  on return:
  3054.  ZF = 0 if key pressed (data waiting)
  3055.  AX = 0 if no scan code is available
  3056.  AH = scan code
  3057.  AL = ASCII character or zero if special function key
  3058.  
  3059.  
  3060.  - available on AT and PS2 machines with extended keyboard support
  3061.  - data is not removed from buffer
  3062.  - similar to INT 16,1
  3063.  
  3064. :int 16,12
  3065. ^INT 16,12 - Extended Get Keyboard Status  (AT+)
  3066.  
  3067.  AH = 12h
  3068.  
  3069.  on return:
  3070.  AH = BIOS keyboard flags (BIOS Data Area location 40:18)
  3071.  
  3072.    │7│6│5│4│3│2│1│0│  AH
  3073.     │ │ │ │ │ │ │ └──── left CTRL key depressed
  3074.     │ │ │ │ │ │ └───── left ALT key depressed
  3075.     │ │ │ │ │ └────── right CTRL key pressed
  3076.     │ │ │ │ └─────── right ALT key depressed
  3077.     │ │ │ └──────── scroll-lock depressed
  3078.     │ │ └───────── num-lock key depressed
  3079.     │ └────────── caps-lock key depressed
  3080.     └─────────── system request key depressed
  3081.  
  3082.  AL = BIOS keyboard flags (BIOS Data Area location 40:17)
  3083.  
  3084.    │7│6│5│4│3│2│1│0│  AL
  3085.     │ │ │ │ │ │ │ └──── right shift key depressed
  3086.     │ │ │ │ │ │ └───── left shift key depressed
  3087.     │ │ │ │ │ └────── CTRL key depressed
  3088.     │ │ │ │ └─────── ALT key depressed
  3089.     │ │ │ └──────── scroll-lock is active
  3090.     │ │ └───────── num-lock is active
  3091.     │ └────────── caps-lock is active
  3092.     └─────────── insert is active
  3093.  
  3094.  
  3095.  - available on AT and PS2 machines with extended keyboard support
  3096.  - similar to INT 16,2
  3097.  
  3098.  - see   KB FLAGS
  3099.  
  3100. :int 17:bios printer services:int 17,status:printer status
  3101. ^INT 17 - Printer BIOS Services
  3102.  
  3103. %Function requested in AH, see  INT 17,n  where n is:
  3104.  
  3105.     0 - Print character
  3106.     1 - Initialize printer port
  3107.     2 - Read printer port status
  3108.  
  3109.  Status flags returned in register AH
  3110.  
  3111.  │7│6│5│4│3│2│1│0│  AH (status)
  3112.   │ │ │ │ │ │ │ └────  time-out
  3113.   │ │ │ │ │ └─┴─────  unused
  3114.   │ │ │ │ └────────  1 = I/O error  (parallel pin 15)
  3115.   │ │ │ └─────────  1 = printer selected/on-line  (parallel pin 13)
  3116.   │ │ └──────────  1 = out of paper  (parallel pin 12)
  3117.   │ └───────────  1 = printer acknowledgment  (parallel pin 10)
  3118.   └────────────  1 = printer not busy  (parallel pin 11)
  3119.  
  3120.  - on the AT, XT 286, and PS2 when the BIOS determines the printer
  3121.    is busy,  INT 15,90  is executed
  3122.  - all printers do not return reliable status information;  bit 3 and
  3123.    bit 7 are usually reliable.
  3124. :int 17,0
  3125. ^INT 17,0 - Print Character
  3126.  
  3127.  
  3128.  AH = 00
  3129.  AL = character to print
  3130.  DX = printer to be used (0-2)
  3131.  
  3132.  
  3133.  on return:
  3134.  AH = printer status
  3135.  
  3136.  
  3137.  - writes character and returns status
  3138.  - see  INT 17,STATUS  for printer status codes
  3139.  
  3140. :int 17,1
  3141. ^INT 17,1 - Initialize Printer Port
  3142.  
  3143.  
  3144.  AH = 01
  3145.  DX = printer port to initialize (0-2)
  3146.  
  3147.  
  3148.  on return:
  3149.  AH = status
  3150.  
  3151.  
  3152.  - initializes printer port and returns status
  3153.  - outputs characters 0x08 and 0x0C to printer port which
  3154.    reset Epson and IBM printers, but may produce undesirable
  3155.    effects on other printers
  3156.  - see  INT 17,STATUS  for printer status codes
  3157.  
  3158. :int 17,2
  3159. ^INT 17,2 - Read Printer Port Status
  3160.  
  3161.  AH = 02
  3162.  DX = printer port to be used (0-2)
  3163.  
  3164.  
  3165.  on return:
  3166.  AH = status
  3167.  
  3168.  │7│6│5│4│3│2│1│0│  Printer status bits
  3169.   │ │ │ │ │ │ │ └──── time out
  3170.   │ │ │ │ │ └─┴───── unused
  3171.   │ │ │ │ └──────── I/O error
  3172.   │ │ │ └───────── selected
  3173.   │ │ └────────── out of paper
  3174.   │ └─────────── acknowledge
  3175.   └──────────── not busy
  3176.  
  3177.  
  3178.  - returns status of specified printer port
  3179. :int 19
  3180. ^INT 19 - Bootstrap Loader
  3181.  
  3182.  
  3183.  DL = physical drive where boot sector is located
  3184.  
  3185.  
  3186.  no output
  3187.  
  3188.  
  3189.  - track 0, sector 1 is loaded into address 0:7C00
  3190.    and control is transferred there
  3191.  - not a preferred method for rebooting by applications.  A
  3192.    better method is to set the word at location 40:72 to 1234h
  3193.    and jump to location FFFF:0 in ROM
  3194.  - memory is not cleared when rebooted through this interrupt
  3195.  
  3196.  - see   WARM BOOT
  3197.  
  3198. :int 1a:bios clock services
  3199. ^INT 1A - System and Real Time Clock BIOS Services
  3200.  
  3201.  
  3202. %Function requested in AH; see also  INT 1A,N  where N is:
  3203.  
  3204.    0 - Read system clock counter
  3205.    1 - Set system clock counter
  3206.    2 - Read real time clock time (AT,PS2)
  3207.    3 - Set real time clock time (AT,PS2)
  3208.    4 - Read real time clock date (AT,PS2)
  3209.    5 - Set real time clock date (AT,PS2)
  3210.    6 - Set real time clock alarm (AT,PS2)
  3211.    7 - Reset real time clock alarm (PS2)
  3212.    8 - Set RTC activated power on mode (convertible,PS2)
  3213.    9 - Read RTC alarm time and status (convertible,PS2)
  3214.    A - Read system day counter (PS2)
  3215.    B - Set system day counter (PS2)
  3216.   80 - Set up sound multiplexer (PCjr only)
  3217.  
  3218.  - see   RTC
  3219. :int 1a,0
  3220. ^INT 1A,0 - Read System Clock Counter
  3221.  
  3222.  
  3223.  AH = 00
  3224.  
  3225.  
  3226.  on return:
  3227.  AL = midnight flag, 1 if 24 hours passed since reset
  3228.  CX = high order word of tick count
  3229.  DX = low order word of tick count
  3230.  
  3231.  
  3232.  - incremented approximately 18.206 times per second
  3233.  - at midnight CX:DX is zero
  3234.  
  3235. :int 1a,1
  3236. ^INT 1A,1 - Set System Clock Counter
  3237.  
  3238.  
  3239.  AH = 01
  3240.  CX = high order word of tick count
  3241.  DX = low order word of tick count
  3242.  
  3243.  
  3244.  returns nothing
  3245.  
  3246.  
  3247.  - CX:DX should be set to the number of seconds past
  3248.    midnight multiplied by approximately 18.206
  3249.  
  3250. :int 1a,2
  3251. ^INT 1A,2 - Read Time From Real Time Clock  (XT 286,AT,PS2)
  3252.  
  3253.  
  3254.  AH = 02
  3255.  
  3256.  
  3257.  on return:
  3258.  CF = 0 if successful
  3259.     = 1 if error, RTC not operating
  3260.  CH = hours in BCD
  3261.  CL = minutes in BCD
  3262.  DH = seconds in BCD
  3263.  DL = 1 if daylight savings time option
  3264.  
  3265.  
  3266.  - on AT with BIOS before 6/10/85, DL is not returned
  3267.  - see   RTC
  3268. :int 1a,3
  3269. ^INT 1A,3 - Set Time on Real Time Clock  (XT 286,AT,PS2)
  3270.  
  3271.  
  3272.  AH = 03
  3273.  CH = hours in BCD
  3274.  CL = minutes in BCD
  3275.  DH = seconds in BCD
  3276.  DL = 1 if daylight savings time option
  3277.     = 0 if standard time
  3278.  
  3279.  
  3280.  returns nothing
  3281.  
  3282.  
  3283.  - clock values must be in BCD
  3284.  - see   RTC
  3285. :int 1a,4
  3286. ^INT 1A,4 - Read Real Time Clock Date  (XT 286,AT,PS2)
  3287.  
  3288.  
  3289.  AH = 04
  3290.  
  3291.  
  3292.  on return:
  3293.  CH = century in BCD (decimal 19 or 20)
  3294.  CL = year in BCD
  3295.  DH = month in BCD
  3296.  DL = day in BCD
  3297.  CF = 0 if successful
  3298.     = 1 if error or clock not operating
  3299.  
  3300.  - see   RTC
  3301. :int 1a,5
  3302. ^INT 1A,5 - Set Real Time Clock Date  (XT 286,AT,PS2)
  3303.  
  3304.  
  3305.  AH = 05
  3306.  CH = century in BCD (decimal 19 or 20)
  3307.  CL = year in BCD
  3308.  DH = month in BCD
  3309.  DL = day in BCD
  3310.  
  3311.  
  3312.  returns nothing
  3313.  
  3314.  
  3315.  - all values must be in BCD
  3316.  - see   RTC
  3317. :int 1a,6
  3318. ^INT 1A,6 - Set Real Time Clock Alarm  (XT 286,AT,PS2)
  3319.  
  3320.  
  3321.  AH = 06
  3322.  CH = hours in BCD
  3323.  CL = minutes in BCD
  3324.  DH = seconds in BCD
  3325.  
  3326.  
  3327.  on return:
  3328.  CF = 1 if alarm already set or clock inoperable
  3329.  
  3330.  
  3331.  - alarm setting is not relative like some sources claim, but the
  3332.    actually clock time the interrupt should occur
  3333.  - settings values must be in BCD
  3334.  - when the alarm time is reached INT 4A is executed
  3335.  - INT 4A vector should be replaced with address of the alarm
  3336.    handling interrupt routine before setting the alarm
  3337.  - INT 1A,7 should be called to disable the RTC alarm
  3338.  - see   RTC
  3339. :int 1a,7
  3340. ^INT 1A,7 - Disable Real Time Clock Alarm  (XT,AT,PS2)
  3341.  
  3342.  
  3343.  AH = 07
  3344.  
  3345.  
  3346.  returns nothing
  3347.  
  3348.  
  3349.  - should be called previous to setting or resetting the
  3350.    RTC alarm with INT 1A,6
  3351.  - see   RTC
  3352. :int 1a,8
  3353. ^INT 1A,8 - Set RTC Activated Power On Mode (convertible)
  3354.  
  3355.  
  3356.  AH = 08
  3357.  CH = hours in BCD
  3358.  CL = minutes in BCD
  3359.  DH = seconds in BCD
  3360.  
  3361.  
  3362.  - see   RTC
  3363. :int 1a,9
  3364. ^INT 1A,9 - Read RTC Alarm Time and Status (convertible,PS2)
  3365.  
  3366.  
  3367.  AH = 09
  3368.  
  3369.  
  3370.  on return:
  3371.  CH = hours in BCD
  3372.  CL = minutes in BCD
  3373.  DH = seconds in BCD
  3374.  DL = alarm status:
  3375.     = 00 if alarm not enabled (AIE=0)
  3376.     = 01 if alarm enabled but will not power up system (AIE=1)
  3377.     = 02 if alarm will power up system (AIE=1)
  3378.  
  3379.  
  3380.  - see   RTC
  3381. :int 1a,a
  3382. ^INT 1A,A - Read System Day Counter (PS2)
  3383.  
  3384.  
  3385.  AH = 0Ah
  3386.  
  3387.  
  3388.  on return:
  3389.  CX = count of days since 1-1-1980
  3390.  
  3391. :int 1a,b
  3392. ^INT 1A,B - Set System Day Counter (PS2)
  3393.  
  3394.  
  3395.  AH = 0Bh
  3396.  CX = count of days since 1-1-1980
  3397.  
  3398. :int 1a,80
  3399. ^INT 1A,80 - Setup Sound Multiplexer  (PCjr only)
  3400.  
  3401.  
  3402.  AL = 00 - source is 8253 channel 2
  3403.     = 01 - source is cassette input
  3404.     = 02 - source is I/O channel "AUDIO IN"
  3405.     = 03 - source is sound generator chip
  3406.  
  3407. :int 1b:bios break interrupt
  3408. ^INT 1B - BIOS Ctrl-Break Handler Address
  3409.  
  3410.  
  3411.  - holds address of the BIOS Ctrl-Break interrupt handler
  3412.  - called by INT 9 after Ctrl-Break key is pressed; INT 9 sets the
  3413.    BIOS keyboard head and tail pointers to the buffer start and
  3414.    places a zero word in the buffer
  3415.  - the BIOS initially sets this value to point to a simple IRET but
  3416.    DOS re-vectors this to its own code, usually 2 lines of code that
  3417.    sets an internal flag (to 3) and then returns via IRET.
  3418.  - DOS checks this flag on entry to many of its subfunctions.  If the
  3419.    flag is set, it invokes INT 23h.
  3420.  - pointing this address to a null function with and IRET disables
  3421.    Ctrl-Break aborts
  3422.  - if the INT 1B code chooses to retain control of the system, it
  3423.    must issue an EOI for any interrupt pending on the 8259 and reset
  3424.    all I/O devices
  3425.  - should be terminated via an IRET
  3426.  - should not be called directly by user application
  3427.  
  3428.  - see    INT 9   INT 23
  3429.  
  3430. :int 1c:user timer routine
  3431. ^INT 1C - System Timer Tick (User Routine)
  3432.  
  3433.  
  3434.  - called by interrupt 8, approximately 18.206 times per
  3435.    second (unless the program modifies the 8253 PIT
  3436.  - this is a user routine which the BIOS defaults to a simple IRET
  3437.  - this interrupt vector can be used for TSR popup utilities,
  3438.    animated graphics updates and event polling
  3439.  - since many TSR's don't maintain the integrity of the interrupt
  3440.    call chain, relying on this for TSR popup isn't recommended
  3441.  
  3442.  - see   INT 8   8253
  3443.  
  3444. :int 1d
  3445. ^INT 1D - Video Initialization Parameter Table Vector
  3446.  
  3447.  
  3448.  - not a true interrupt, but a far pointer to a video
  3449.    initialization parameter table for video controllers
  3450.  
  3451. :int 1e
  3452. ^INT 1E - Disk Initialization Parameter Table Vector
  3453.  
  3454.  - not an interrupt, but a far pointer to the diskette base table
  3455.  - this table contains initialization parameters for the disk
  3456.    controller used during formatting, reading, and writing to a disk
  3457.  
  3458. %Disk Initialization Parameter Table Vector Definition:
  3459.  
  3460. %Offset     Description
  3461.  
  3462.    00  │7│6│5│4│3│2│1│0│  Disk Controller Mode byte 1
  3463.         │ │ │ │ └─┴─┴─┴────  head step rate in milliseconds (0-F)
  3464.         └─┴─┴─┴───────────  head unload time in milliseconds (0-F)
  3465.  
  3466.    01  │7│6│5│4│3│2│1│0│  Disk Controller Mode byte 2
  3467.         │ │ │ │ │ │ │ └──── DMA flag (0 = use DMA)
  3468.         └─┴─┴─┴─┴─┴─┴───── (head load time/2)-1 in milliseconds
  3469.  
  3470.    02  clock ticks until motor off
  3471.    03  FM or MFM Mode:  Log2 (Bytes per Sector/128)
  3472.        FM=Frequency Modulation used on single-density disks
  3473.        MFM=Modified Frequency Modulation used on double-sided disks
  3474.    04  last sector on track
  3475.    05  gap length in bytes:
  3476.  
  3477.               Bytes Per   Sectors     Write    Format
  3478.        MFM     Sector    Per Track     Gap       Gap
  3479.         1        256         18        0Ah       0Ch
  3480.         1        256         16        20h       32h
  3481.         2        512          8        2Ah       50h
  3482.         2        512          9        1Bh       6Ch
  3483.         3       1024          4        80h       F0h
  3484.         4       2048          2        C8h       FFh
  3485.         5       4096          1        C8h       FFh
  3486.  
  3487.    06  disk data length
  3488.        80h for 128 bytes/sector
  3489.        FFh otherwise
  3490.    07  gap length when formatting
  3491.    08  data pattern used during formatting
  3492.    09  floppy head bounce delay (in milliseconds)
  3493.    0A  floppy motor start delay (in 0.125 second intervals)
  3494.    0B  floppy motor stop delay (in 0.25 second intervals)
  3495.  
  3496.  - see INT 13,18
  3497.  
  3498. :int 1f
  3499. ^INT 1F - Graphics Display Character Bit Map Table
  3500.  
  3501.  
  3502.  - not a true interrupt, but a far pointer to a table of
  3503.    character bit maps for the graphics mode representation of
  3504.    ASCII characters 128 through 255
  3505.  - can be used to change character fonts in CGA graphics mode
  3506.  
  3507. :dos interrupts
  3508. ^DOS Interrupt Summary
  3509.  
  3510.  
  3511.  See the following for more information:
  3512.  
  3513.     INT 20 - Program terminate
  3514.     INT 21 - DOS Function Dispatcher
  3515.     INT 22 - Program Terminate
  3516.     INT 23 - Ctl-break exit address
  3517.     INT 24 - Critical error handler address
  3518.     INT 25 - Absolute disk read
  3519.     INT 26 - Absolute disk write
  3520.     INT 27 - Terminate but stay resident
  3521.     INT 28 - DOS idle loop/scheduler (undocumented)
  3522.     INT 29 - Fast character output (undocumented)
  3523.     INT 2E - Execute command using base level COMMAND.COM (undoc.)
  3524.     INT 2F - Multiplex interrupt (DOS 3.x+)
  3525.  
  3526. :int 20
  3527. ^INT 20 - Program Terminate
  3528.  
  3529.  
  3530.  CS = address of PSP
  3531.  
  3532.  
  3533.  returns nothing
  3534.  
  3535.  
  3536.  - INT 20 restores the terminate, ctl-break, and critical error
  3537.    exit addresses from values in the PSP, flushes all buffers, frees
  3538.    memory and returns to DOS via the termination handler address
  3539.  - does not close FCBs
  3540.  - this function is no longer recommended, but can be used by
  3541.    version of DOS before 2.0
  3542.  - see   INT 21,4C   INT 21,0
  3543.  
  3544. :int 21:dos services:dos functions
  3545. ^INT 21 - DOS Function Dispatcher
  3546.  
  3547. %Function requested in AH; see also  INT 21,N  where N is:
  3548.  
  3549.     0 - Program terminate
  3550.     1 - Keyboard input with echo
  3551.     2 - Display output
  3552.     3 - Wait for auxiliary device input
  3553.     4 - Auxiliary output
  3554.     5 - Printer output
  3555.     6 - Direct console I/O
  3556.     7 - Wait for direct console input without echo
  3557.     8 - Wait for console input without echo
  3558.     9 - Print string
  3559.     A - Buffered keyboard input
  3560.     B - Check standard input status
  3561.     C - Clear keyboard buffer, invoke keyboard function
  3562.     D - Disk reset
  3563.     E - Select disk
  3564.     F - Open file using FCB
  3565.    10 - Close file using FCB
  3566.    11 - Search for first entry using FCB
  3567.    12 - Search for next entry using FCB
  3568.    13 - Delete file using FCB
  3569.    14 - Sequential read using FCB
  3570.    15 - Sequential write using FCB
  3571.    16 - Create a file using FCB
  3572.    17 - Rename file using FCB
  3573.    18 - DOS dummy function (CP/M) (not used/listed)
  3574.    19 - Get current default drive
  3575.    1A - Set disk transfer address
  3576.    1B - Get allocation table information
  3577.    1C - Get allocation table info for specific device
  3578.    1D - DOS dummy function (CP/M) (not used/listed)
  3579.    1E - DOS dummy function (CP/M) (not used/listed)
  3580.    1F - Get pointer to default drive parameter table (undocumented)
  3581.    20 - DOS dummy function (CP/M) (not used/listed)
  3582.    21 - Random read using FCB
  3583.    22 - Random write using FCB
  3584.    23 - Get file size using FCB
  3585.    24 - Set relative record field for FCB
  3586.    25 - Set interrupt vector
  3587.    26 - Create new program segment
  3588.    27 - Random block read using FCB
  3589.    28 - Random block write using FCB
  3590.    29 - Parse filename for FCB
  3591.    2A - Get date
  3592.    2B - Set date
  3593.    2C - Get time
  3594.    2D - Set time
  3595.    2E - Set/reset verify switch
  3596.    2F - Get disk transfer address
  3597.    30 - Get DOS version number
  3598.    31 - Terminate process and remain resident
  3599.    32 - Get pointer to drive parameter table (undocumented)
  3600.    33 - Get/set ctl-break check state & get boot drive
  3601.    34 - Get address to DOS critical flag (undocumented)
  3602.    35 - Get vector
  3603.    36 - Get disk free space
  3604.    37 - Get/set switch character (undocumented)
  3605.    38 - Get/set country dependent information
  3606.    39 - Create subdirectory (mkdir)
  3607.    3A - Remove subdirectory (rmdir)
  3608.    3B - Change current subdirectory (chdir)
  3609.    3C - Create file using handle
  3610.    3D - Open file using handle
  3611.    3E - Close file using handle
  3612.    3F - Read file or device using handle
  3613.    40 - Write file or device using handle
  3614.    41 - Delete file
  3615.    42 - Move file pointer using handle
  3616.    43 - Change file mode
  3617.    44 - I/O control for devices
  3618.    45 - Duplicate file handle
  3619.    46 - Force duplicate file handle
  3620.    47 - Get current directory
  3621.    48 - Allocate memory blocks
  3622.    49 - Free allocated memory blocks
  3623.    4A - Modify allocated memory blocks
  3624.    4B - EXEC load and execute program (func 1 undocumented)
  3625.    4C - Terminate process with return code
  3626.    4D - Get return code of a sub-process
  3627.    4E - Find first matching file
  3628.    4F - Find next matching file
  3629.    50 - Set current process id (undocumented)
  3630.    51 - Get current process id (undocumented)
  3631.    52 - Get pointer to DOS "INVARS" (undocumented)
  3632.    53 - Generate drive parameter table (undocumented)
  3633.    54 - Get verify setting
  3634.    55 - Create PSP (undocumented)
  3635.    56 - Rename file
  3636.    57 - Get/set file date and time using handle
  3637.    58 - Get/set memory allocation strategy (3.x+, undocumented)
  3638.    59 - Get extended error information (3.x+)
  3639.    5A - Create temporary file (3.x+)
  3640.    5B - Create new file (3.x+)
  3641.    5C - Lock/unlock file access (3.x+)
  3642.    5D - Critical error information (undocumented)
  3643.    5E - Network services (3.1+)
  3644.    5F - Network redirection (3.1+)
  3645.    60 - Get fully qualified file name (undocumented 3.x+)
  3646.    62 - Get address of program segment prefix (3.x+)
  3647.    63 - Get system lead byte table (MSDOS 2.25 only)
  3648.    64 - Set device driver look ahead  (undocumented 3.3+)
  3649.    65 - Get extended country information (3.3+)
  3650.    66 - Get/set global code page (3.3+)
  3651.    67 - Set handle count (3.3+)
  3652.    68 - Flush buffer (3.3+)
  3653.    69 - Get/set disk serial number (undocumented DOS 4.0+)
  3654.    6A - DOS reserved (DOS 4.0+)
  3655.    6B - DOS reserved
  3656.    6C - Extended open/create (4.x+)
  3657.    F8 - Set OEM INT 21 handler (functions F9-FF) (undocumented)
  3658.  
  3659.  
  3660. %FCB related DOS functions:
  3661.  
  3662.     F - Open file using FCB
  3663.    10 - Close file using FCB
  3664.    11 - Search for first entry using FCB
  3665.    12 - Search for next entry using FCB
  3666.    13 - Delete file using FCB
  3667.    14 - Sequential read using FCB
  3668.    15 - Sequential write using FCB
  3669.    16 - Create a file using FCB
  3670.    17 - Rename file using FCB
  3671.    21 - Random read using FCB
  3672.    22 - Random write using FCB
  3673.    23 - Get file size using FCB
  3674.    24 - Set relative record field for FCB
  3675.    27 - Random block read using FCB
  3676.    28 - Random block write using FCB
  3677.    29 - Parse filename for FCB
  3678.  
  3679.  
  3680. %Handle and Non-FCB related DOS function calls:
  3681.  
  3682.    3C - Create file using handle
  3683.    3D - Open file using handle
  3684.    3E - Close file using handle
  3685.    3F - Read file or device using handle
  3686.    40 - Write file or device using handle
  3687.    41 - Delete file
  3688.    42 - Move file pointer using handle
  3689.    43 - Change file mode
  3690.    45 - Duplicate file handle
  3691.    46 - Force duplicate file handle
  3692.    56 - Rename file
  3693.    57 - Get/set file date and time using handle
  3694.    5A - Create temporary file (3.x+)
  3695.    5B - Create new file (3.x+)
  3696.    67 - Set handle count (3.3+)
  3697.    68 - Flush buffer (3.3+)
  3698.  
  3699.  
  3700.  - int 21 functions are called with the function number in AH
  3701.  - register AX may be altered, its contents are not guaranteed
  3702.  - if an error occurs, CF is set to 1 and AX contains a simple
  3703.    error code;   INT 21,59 can be used to determine cause.
  3704.  - most INT 21 functions do not restore the flags to pre-interrupt
  3705.    state to allow returning of information via the flags register
  3706.  
  3707. :int 21,0
  3708. ^INT 21,0 - Program Terminate
  3709.  
  3710.  
  3711.  AH = 00
  3712.  CS = PSP segment address
  3713.  
  3714.  
  3715.  returns nothing
  3716.  
  3717.  
  3718.  - restores the terminate, ctl-break, and critical error
  3719.    exit addresses, flushes all buffers, frees memory
  3720.    and returns to DOS via the termination handler address
  3721.  - does not close FCBs
  3722.  - this function is no longer recommended, but can be used by
  3723.    version of DOS before 2.0
  3724.  
  3725.  
  3726.  - see   INT 21,4C   INT 20
  3727.  
  3728. :int 21,1
  3729. ^INT 21,1 - Keyboard Input with Echo
  3730.  
  3731.  
  3732.  AH = 01
  3733.  
  3734.  
  3735.  on return:
  3736.  AL = character from standard input device
  3737.  
  3738.  
  3739.  - waits for keyboard input from STDIN and echoes to STDOUT
  3740.  - returns 0 for extended keystroke, then function must be
  3741.    called again to return scan code
  3742.  - if Ctrl-Break is detected, INT 23h is executed
  3743.  
  3744. :int 21,2
  3745. ^INT 21,2 - Display Output
  3746.  
  3747.  
  3748.  AH = 02
  3749.  DL = character to output
  3750.  
  3751.  
  3752.  returns nothing
  3753.  
  3754.  
  3755.  - outputs character to STDOUT
  3756.  - backspace is treated as non-destructive cursor left
  3757.  - if Ctrl-Break is detected, INT 23h is executed
  3758.  
  3759. :int 21,3
  3760. ^INT 21,3 - Wait for Auxiliary Device Input
  3761.  
  3762.  
  3763.  AH = 03
  3764.  
  3765.  
  3766.  on return:
  3767.  AL = character from the auxiliary device
  3768.  
  3769.  
  3770.  - does not supply error returns
  3771.  - waits for character and reads from STDAUX
  3772.  - default DOS AUX parameters are 2400,N,8,1
  3773.  
  3774. :int 21,4
  3775. ^INT 21,4 - Auxiliary Output
  3776.  
  3777.  
  3778.  AH = 04
  3779.  DL = character to output
  3780.  
  3781.  
  3782.  returns nothing
  3783.  
  3784.  
  3785.  - sends character in DL to STDAUX
  3786.  - does not supply error returns
  3787.  - waits until STDAUX is available
  3788.  - default DOS AUX parameters are 2400,N,8,1
  3789.  
  3790. :int 21,5
  3791. ^INT 21,5 - Printer Output
  3792.  
  3793.  
  3794.  AH = 05
  3795.  DL = character to output
  3796.  
  3797.  
  3798.  returns nothing
  3799.  
  3800.  
  3801.  - sends character in DL to STDPRN
  3802.  - waits until STDPRN device is ready before output
  3803.  
  3804. :int 21,6
  3805. ^INT 21,6 - Direct Console I/O
  3806.  
  3807.  AH = 06
  3808.  DL = (0-FE) character to output
  3809.     = FF if console input request
  3810.  
  3811.  on return:
  3812.  AL = input character if console input request (DL=FF)
  3813.  ZF = 0  if console request character available (in AL)
  3814.     = 1  if no character is ready, and function request
  3815.       was console input
  3816.  
  3817.  
  3818.  - reads from or writes to the console device depending on
  3819.    the value of DL
  3820.  - cannot output character FF  (DL=FF indicates read function)
  3821.  - for console read, no echo is produced
  3822.  - returns 0 for extended keystroke, then function must be
  3823.    called again to return scan code
  3824.  - ignores Ctrl-Break and Ctrl-PrtSc
  3825.  
  3826. :int 21,7
  3827. ^INT 21,7 - Direct Console Input Without Echo
  3828.  
  3829.  
  3830.  AH = 07
  3831.  
  3832.  
  3833.  on return:
  3834.  AL = character from STDIN
  3835.  
  3836.  
  3837.  - waits for keyboard input until keystroke is ready
  3838.  - character is not echoed to STDOUT
  3839.  - returns 0 for extended keystroke, then function must be
  3840.    called again to return scan code
  3841.  - ignores Ctrl-Break and Ctrl-PrtSc
  3842.  - see   INT 21,1
  3843.  
  3844. :int 21,8
  3845. ^INT 21,8 - Console Input Without Echo
  3846.  
  3847.  
  3848.  AH = 08
  3849.  
  3850.  
  3851.  on return:
  3852.  AL = character from STDIN
  3853.  
  3854.  
  3855.  - returns 0 for extended keystroke, then function must be
  3856.    called again to return scan code
  3857.  - waits for character from STDIN and returns data in AL
  3858.  - if Ctrl-Break is detected, INT 23h is executed
  3859.  
  3860. :int 21,9
  3861. ^INT 21,9 - Print String
  3862.  
  3863.  
  3864.  AH = 09
  3865.  DS:DX = pointer to string ending in "$"
  3866.  
  3867.  
  3868.  returns nothing
  3869.  
  3870.  
  3871.  - outputs character string to STDOUT up to "$"
  3872.  - backspace is treated as non-destructive
  3873.  - if Ctrl-Break is detected, INT 23h is executed
  3874.  
  3875. :int 21,a
  3876. ^INT 21,A - Buffered Keyboard Input
  3877.  
  3878.  AH = 0A
  3879.  DS:DX = pointer to input buffer of the format:
  3880.  
  3881.  │ max │ count │  BUFFER (N bytes)
  3882.     │      │          └────── input buffer
  3883.     │      └──────────── number of characters returned (byte)
  3884.     └────────────── maximum number of characters to read (byte)
  3885.  
  3886.  
  3887.  returns nothing
  3888.  
  3889.  - since strings can be pre-loaded, it is recommended that the
  3890.    default string be terminated with a CR
  3891.  - N bytes of data are read from STDIN into buffer+2
  3892.  - max buffer size is 255, minimum buffer size is 1 byte
  3893.  - chars up to and including a CR are placed into the buffer
  3894.    beginning at byte 2;  Byte 1 returns the number of chars
  3895.    placed into the buffer  (extended codes take 2 characters)
  3896.  - DOS editing keys are active during this call
  3897.  - INT 23 is called if Ctrl-Break or Ctrl-C detected
  3898.  
  3899. :int 21,b
  3900. ^INT 21,B - Check Standard Input Status
  3901.  
  3902.  
  3903.  AH = 0B
  3904.  
  3905.  
  3906.  on return:
  3907.  AL = 00 if no character available
  3908.     = FF if character available
  3909.  
  3910.  
  3911.  - checks STDIN for available characters
  3912.  - character is not returned
  3913.  - if Ctrl-Break is detected INT 23h is executed
  3914.  
  3915. :int 21,c
  3916. ^INT 21,C - Clear Keyboard Buffer and Invoke Keyboard Function
  3917.  
  3918.  
  3919.  AH = 0C
  3920.  AL = 01, 06, 07, 08 or 0A   (INT 21 input functions)
  3921.  
  3922.  
  3923.  on return:
  3924.  see return values from INT 21,AL where AL is 1, 6, 7, 8 or A
  3925.  
  3926.  
  3927.  - main function is to clear the input buffer and call INT 21h with
  3928.    the specified function (in AL)
  3929.  - see   INT 21
  3930.  
  3931. :int 21,d
  3932. ^INT 21,D - Disk Reset
  3933.  
  3934.  
  3935.  AH = 0D
  3936.  
  3937.  
  3938.  returns nothing
  3939.  
  3940.  
  3941.  - all file buffers are flushed to disk
  3942.  - does NOT update directory entry
  3943.  
  3944. :int 21,e
  3945. ^INT 21,E - Select Disk
  3946.  
  3947.  
  3948.  AH = 0E
  3949.  DL = zero based, drive number (0-25, A: - Z:)
  3950.  
  3951.  
  3952.  on return:
  3953.  AL = one based, total number of logical drives including
  3954.       hardfiles (1-26)
  3955.  
  3956.  
  3957.  - for DOS 3.x+, this function returns the number of logical
  3958.    drives or the value of LASTDRIVE (default of 5) in the
  3959.    CONFIG.SYS file
  3960.  
  3961. :int 21,f
  3962. ^INT 21,F - Open a File Using FCB
  3963.  
  3964.  AH = 0F
  3965.  DS:DX = pointer to unopened FCB
  3966.  
  3967.  
  3968.  on return:
  3969.  AL = 00 if file opened
  3970.     = FF if unable to open
  3971.  
  3972.  
  3973.  - opens an existing file using a previously setup FCB
  3974.  - the FCB fields drive identifier, filename and extension
  3975.    must be filled in before call
  3976.  - sets default FCB fields; current block number is set to 0;
  3977.    record size is set to 80h; file size, date and time are set
  3978.    to the values from the directory
  3979.  - does not create file, see  INT 21,16
  3980.  - DOS 2.x allows opening of subdirectories, DOS 3.x does not
  3981.  
  3982.  - see   FCB
  3983. :int 21,10
  3984. ^INT 21,10 - Close a File Using FCB
  3985.  
  3986.  
  3987.  AH = 10h
  3988.  DS:DX = pointer to opened FCB
  3989.  
  3990.  
  3991.  on return:
  3992.  AL = 00  if file closed
  3993.     = FF  if file not closed
  3994.  
  3995.  
  3996.  - closes a previously opened file opened with an FCB
  3997.  - FCB must be setup with drive id, filename, and extension
  3998.    before call
  3999.  
  4000. :int 21,11
  4001. ^INT 21,11 - Search for First Entry Using FCB
  4002.  
  4003.  AH = 11h
  4004.  DS:DX = pointer to unopened FCB
  4005.  
  4006.  on return:
  4007.  AL = 00 if matching file found
  4008.     = FF if file not found
  4009.  
  4010.  - searches for first occurrence of filename specified in FCB
  4011.  - FCB must have drive id, filename, and extension before call
  4012.  - extended FCB can be used to specify a search criteria based
  4013.    on attributes; hidden, system, label, and directory attributes
  4014.    can be used to narrow the search  (see FILE ATTRIBUTES)
  4015.  - after successful call DTA holds an unopened FCB/XFCB for
  4016.    the requested file.   Using any of the other FCB functions
  4017.    destroys this DTA copy of the FCB/XFCB
  4018.  - searching can be continued with the FCB find-next function
  4019.  - "?" wildcard supported after DOS 2.1, "*" supported in DOS 3.x
  4020.  - DOS 2.x can't find . and .. entries, DOS 3.x can (unless in root)
  4021.  - see   INT 21,12   FCB   XFCB   FILE ATTRIBUTES
  4022.  
  4023. :int 21,12
  4024. ^INT 21,12 - Search for Next Entry Using FCB
  4025.  
  4026.  AH = 12h
  4027.  DS:DX = pointer to unopened FCB returned from
  4028.          INT 21,11  or  INT 21,12
  4029.  
  4030.  
  4031.  on return:
  4032.  AL = 00 if file found
  4033.     = FF if file not found
  4034.  
  4035.  
  4036.  - finds next matching file after calls to INT 21,11 and
  4037.    INT 21,12
  4038.  - FCB should be the same across calls to INT 21,11 and 12
  4039.  - after successful call DTA holds an unopened FCB/XFCB for
  4040.    the requested file.   Using any of the other FCB functions
  4041.    destroys this DTA copy of the FCB/XFCB
  4042.  
  4043.  - see   FCB   XFCB
  4044. :int 21,13
  4045. ^INT 21,13 - Delete File Using FCB
  4046.  
  4047.  
  4048.  AH = 13h
  4049.  DS:DX = pointer to an unopened FCB
  4050.  
  4051.  
  4052.  on return:
  4053.  AL = 00 if file deleted
  4054.     = FF if file not found
  4055.  
  4056.  
  4057.  - deletes unopened file with normal attributes
  4058.  - FCB must contain drive id, filename, and extension before call
  4059.  - "?" wildcard supported after DOS 2.1, "*" supported by DOS 3.x+
  4060.  - DOS 2.x allowed deletion of a subdirectory if XFCB was provided,
  4061.    even if files existed, causing lost clusters.  DOS 3.x does not
  4062.  
  4063.  - see   FCB   XFCB
  4064.  
  4065. :int 21,14
  4066. ^INT 21,14 - Sequential Read Using FCB
  4067.  
  4068.  AH = 14h
  4069.  DS:DX = pointer to an opened FCB
  4070.  
  4071.  
  4072.  on return:
  4073.  AL = 00 if successful read
  4074.     = 01 if end of file (no data read)
  4075.     = 02 if DTA is too small
  4076.     = 03 if end of file or partial record read
  4077.  
  4078.  
  4079.  - reads a record from file pointed to by FCB at the location
  4080.    specified in current block and current record number
  4081.  - data record is read into the DTA
  4082.  - FCB record number is updated
  4083.  
  4084.  - see   FCB   XFCB
  4085. :int 21,15
  4086. ^INT 21,15 - Sequential Write Using FCB
  4087.  
  4088.  
  4089.  AH = 15h
  4090.  DS:DX = pointer to an opened FCB
  4091.  
  4092.  
  4093.  on return:
  4094.  AL = 00 if write was successful
  4095.     = 01 if diskette is full or read only
  4096.     = 02 if DTA is too small
  4097.  
  4098.  
  4099.  - writes a record from the DTA to the current record position
  4100.    in file specified by the opened FCB
  4101.  - record size and output location are maintained in the FCB
  4102.  
  4103.  - see   FCB   XFCB
  4104.  
  4105. :int 21,16
  4106. ^INT 21,16 - Create a File Using FCB
  4107.  
  4108.  
  4109.  AH = 16h
  4110.  DS:DX = pointer to an unopened FCB
  4111.  
  4112.  
  4113.  on return:
  4114.  AL = 00 if file created
  4115.     = FF if file creation failed
  4116.  
  4117.  
  4118.  - creates file using FCB and leaves open for later output
  4119.  - FCB must be setup with drive id, filename, and extension
  4120.    before call
  4121.  - an extended FCB can be used to also set file attributes
  4122.  
  4123.  - see   FCB   XFCB
  4124.  
  4125. :int 21,17
  4126. ^INT 21,17 - Rename a File Using FCB
  4127.  
  4128.  AH = 17h
  4129.  DS:DX = pointer to a modified FCB of the format:
  4130.  
  4131.    Offset     Description
  4132.      00     drive designator
  4133.      01     original file name
  4134.      09     original file extension
  4135.      11     new file name
  4136.      19     new extension
  4137.  
  4138.  
  4139.  on return:
  4140.  AL = 00 if file renamed
  4141.     = FF if file not renamed
  4142.  
  4143.  
  4144.  - allows renaming of files with normal attributes
  4145.  - "?" wildcard supported after DOS 2.1, "*" supported by
  4146.    DOS 3.x+
  4147. :int 21,19
  4148. ^INT 21,19 - Get Current Default Drive
  4149.  
  4150.  
  4151.  AH = 19h
  4152.  
  4153.  
  4154.  on return:
  4155.  AL = current default drive (0=A,1=B,etc)
  4156.  
  4157.  
  4158.  - determines the current default drive
  4159.  
  4160. :int 21,1a
  4161. ^INT 21,1A - Set Disk Transfer Address (DTA)
  4162.  
  4163.  
  4164.  AH = 1A
  4165.  DS:DX = pointer to disk transfer address
  4166.  
  4167.  
  4168.  returns nothing
  4169.  
  4170.  
  4171.  - specifies the disk transfer address to DOS
  4172.  - DTA cannot overlap 64K segment boundary
  4173.  - offset 80h in the PSP is a 128 byte default DTA supplied
  4174.    by DOS upon program load
  4175.  - use of the DTA provided by DOS will result in the loss
  4176.    of the program command tail which also occupies the 128
  4177.    bytes starting at offset 80h of the PSP
  4178.  
  4179. :int 21,1b
  4180. ^INT 21,1B - Get Allocation Table Information
  4181.  
  4182.  
  4183.  AH = 1B
  4184.  
  4185.  
  4186.  on return:
  4187.  AL = sectors per cluster
  4188.  CX = bytes per sector
  4189.  DX = clusters on disk
  4190.  DS:BX = pointer to Media Descriptor Byte found in FAT
  4191.  
  4192.  
  4193.  - retrieves information on capacity and format of default drive
  4194.  - DS:BX can be used to determine if drive is RAMDISK or removable
  4195.  - see   MEDIA DESCRIPTOR BYTE   INT 21,1C
  4196.  
  4197. :int 21,1c
  4198. ^INT 21,1C - Get Allocation Table Info for Specified Drive
  4199.  
  4200.  
  4201.  AH = 1C
  4202.  DL = drive number (0 for default, 1 = A:, Z: = 26)
  4203.  
  4204.  
  4205.  on return:
  4206.  AL = sectors per cluster
  4207.  CX = bytes per sector
  4208.  DX = clusters on disk
  4209.  DS:BX = pointer to Media Descriptor Byte found in FAT
  4210.  
  4211.  
  4212.  - retrieves information on capacity and format of specified drive
  4213.  - DS:BX can be used to determine if drive is RAMDISK or removable
  4214.  - see   MEDIA DESCRIPTOR BYTE   INT 21,1B
  4215.  
  4216. :int 21,1f
  4217. ^INT 21,1F - Get Pointer to Current Drive Parameter Table
  4218. ^(Undocumented)
  4219.  
  4220.  
  4221.  AH = 1F
  4222.  DL = drive number (0=default, 1=A, ...)
  4223.  
  4224.  
  4225.  on return:
  4226.  AL = 00 - DS:BX is pointer to drive parameter table  (DPT)
  4227.       FF - drive does not exist
  4228.  DS:BX = pointer to drive parameter table (DPT) if AL=0
  4229.  
  4230.  
  4231.  - the format of the DPT varies between DOS versions
  4232.  
  4233.  
  4234.  - see   DPT   UNDOC
  4235.  
  4236. :int 21,21
  4237. ^INT 21,21 - Random Read Using FCB
  4238.  
  4239.  
  4240.  AH = 21h
  4241.  DS:DX = pointer to an opened FCB
  4242.  
  4243.  
  4244.  on return:
  4245.  AL = 00 if read successful
  4246.     = 01 if EOF (no data read)
  4247.     = 02 if DTA is too small
  4248.     = 03 if EOF (partial record read)
  4249.  
  4250.  
  4251.  - reads random records from a file opened with an FCB
  4252.    to the DTA
  4253.  - FCB must be setup with drive id, filename, extension,
  4254.    record position and record length before call
  4255.  - current record position field in FCB is not updated
  4256.  
  4257. :int 21,22
  4258. ^INT 21,22 - Random Write Using FCB
  4259.  
  4260.  
  4261.  AH = 22h
  4262.  DS:DX = far pointer to an opened FCB
  4263.  
  4264.  
  4265.  on return:
  4266.  AL = 00 if write successful
  4267.     = 01 if diskette full or read only
  4268.     = 02 if DTA is too small
  4269.  
  4270.  
  4271.  - write records to random location in file opened with FCB
  4272.  - FCB must be setup with drive id, filename, extension,
  4273.    record position and record length before call
  4274.  - current record position field in FCB is not updated
  4275.  
  4276. :int 21,23
  4277. ^INT 21,23 - Get File Size Using FCB
  4278.  
  4279.  
  4280.  AH = 23h
  4281.  DS:DX = pointer to an unopened FCB
  4282.  
  4283.  
  4284.  on return:
  4285.  AL = 00 if successful
  4286.     = FF if file not found
  4287.  
  4288.  
  4289.  - determines the number of records in a file
  4290.  - FCB must be setup with drive id, complete filename and
  4291.    extension plus record length before call
  4292.  - updates random record position in FCB located at DS:DX
  4293.    with file record count
  4294.  
  4295. :int 21,24
  4296. ^INT 21,24 - Set Relative Record Field in FCB
  4297.  
  4298.  
  4299.  AH = 24h
  4300.  DS:DX = pointer to an opened FCB
  4301.  
  4302.  
  4303.  returns nothing
  4304.  
  4305.  
  4306.  - modifies opened FCB for random operation
  4307.  - sets FCB random record field to current sequential block
  4308.    and record fields
  4309.  
  4310. :int 21,25
  4311. ^INT 21,25 - Set Interrupt Vector
  4312.  
  4313.  
  4314.  AH = 25h
  4315.  AL = interrupt number
  4316.  DS:DX = pointer to interrupt handler
  4317.  
  4318.  
  4319.  returns nothing
  4320.  
  4321.  
  4322.  - provides a safe method for changing interrupt vectors
  4323.  
  4324.  
  4325.  - see   INT 21,35
  4326.  
  4327. :int 21,26
  4328. ^INT 21,26 - Create New Program Segment Prefix
  4329.  
  4330.  
  4331.  AH = 26h
  4332.  DX = segment address of new PSP
  4333.  
  4334.  
  4335.  returns nothing
  4336.  
  4337.  
  4338.  - allocates memory for a PSP and copies current PSP there
  4339.  - used before DOS 2.x to spawn a child process
  4340.  - the application is responsible for allocating any memory
  4341.    necessary for the child process
  4342.  - INT 21,4B (EXEC) is now the recommended method for starting
  4343.    a child process, so this function should be avoided
  4344.  
  4345.  
  4346.  - see   INT 21,4B   INT 21,55   EXEC...   SPAWN...
  4347.  
  4348. :int 21,27
  4349. ^INT 21,27 - Random Block Read Using FCB
  4350.  
  4351.  
  4352.  AH = 27h
  4353.  CX = number of records to read
  4354.  DS:DX = pointer to an opened FCB
  4355.  
  4356.  
  4357.  on return:
  4358.  AL = 00 if read was successful
  4359.     = 01 if EOF (no data read)
  4360.     = 02 if DTA is too small
  4361.     = 03 if EOF (partial record read)
  4362.  CX = actual number of records read
  4363.  
  4364.  
  4365.  - allows random access and sequential reading of a group
  4366.    of records from a file opened with an FCB into the DTA
  4367.  - FCB must be setup with drive id, filename, extension
  4368.    record length and random record number before call
  4369.  
  4370. :int 21,28
  4371. ^INT 21,28 - Random Block Write Using FCB
  4372.  
  4373.  
  4374.  AH = 28h
  4375.  CX = number of records to write
  4376.  DS:DX = pointer to an opened FCB
  4377.  
  4378.  
  4379.  on return:
  4380.  AL = 00 if write successful
  4381.     = 01 if diskette full or read only
  4382.     = 02 if DTA is too small
  4383.  CX = number of records written
  4384.  
  4385.  
  4386.  - allows random access and sequential writing of a group
  4387.    of records from a file opened with an FCB into the DTA
  4388.  - FCB must be setup with random record number and record size
  4389.  - updates random record number, current block and current
  4390.    record fields
  4391.  
  4392. :int 21,29
  4393. ^INT 21,29 - Parse a Filename for FCB
  4394.  
  4395.  AH = 29h
  4396.  AL = bit pattern to control parsing (see bit meanings below)
  4397.  DS:SI = pointer to a command line to parse
  4398.  ES:DI = pointer to a buffer for unopened FCB
  4399.  
  4400.  
  4401.  Bit patterns for parsing control found in AL:
  4402.  
  4403.  │7│6│5│4│3│2│1│0│  AL
  4404.   │ │ │ │ │ │ │ └──── 1 = ignore leading separators
  4405.   │ │ │ │ │ │ │       0 = don't ignore leading separators
  4406.   │ │ │ │ │ │ └───── 1 = modify drive ID if specified
  4407.   │ │ │ │ │ │        0 = modify drive ID regardless
  4408.   │ │ │ │ │ └────── 1 = modify filename if specified
  4409.   │ │ │ │ │         0 = modify filename regardless
  4410.   │ │ │ │ └─────── 1 = modify extension if specified
  4411.   │ │ │ │          0 = modify extension regardless
  4412.   └─┴─┴─┴──────── unused
  4413.  
  4414.  on return:
  4415.  AL = 00 if no wildcard characters present
  4416.     = 01 if wildcards present in string
  4417.     = FF if drive specifier is invalid
  4418.  DS:SI = pointer to the first character after parsed filename
  4419.  ES:DI = pointer to the updated unopened FCB
  4420.  
  4421.  
  4422.  - retrieves filename from the command line string and places
  4423.    the filename components into an unopened FCB for later use
  4424.  - if no filename is found a pointer is returned in ES:DI that
  4425.    has a blank at ES:DI+1
  4426.  
  4427. :int 21,2a
  4428. ^INT 21,2A - Get Date
  4429.  
  4430.  
  4431.  AH = 2A
  4432.  
  4433.  
  4434.  on return:
  4435.  AL = day of the week (0=Sunday)
  4436.  CX = year (1980-2099)
  4437.  DH = month (1-12)
  4438.  DL = day (1-31)
  4439.  
  4440.  
  4441.  - retrieves system date based on the DOS maintained clock
  4442.  
  4443. :int 21,2b
  4444. ^INT 21,2B - Set Date
  4445.  
  4446.  
  4447.  AH = 2B
  4448.  CX = year (1980-2099)
  4449.  DH = month (1-12)
  4450.  DL = day (1-31)
  4451.  
  4452.  
  4453.  on return:
  4454.  AL = 00 if date change successful
  4455.     = FF if invalid date
  4456.  
  4457.  
  4458.  - sets DOS maintained clock
  4459.  - DOS version 3.3+ also update CMOS date where applicable
  4460.  
  4461. :int 21,2c
  4462. ^INT 21,2C - Get Time
  4463.  
  4464.  
  4465.  AH = 2C
  4466.  
  4467.  
  4468.  on return:
  4469.  CH = hour (0-23)
  4470.  CL = minutes (0-59)
  4471.  DH = seconds (0-59)
  4472.  DL = hundredths (0-99)
  4473.  
  4474.  
  4475.  - retrieves DOS maintained clock time
  4476.  
  4477. :int 21,2d
  4478. ^INT 21,2D - Set Time
  4479.  
  4480.  
  4481.  AH = 2D
  4482.  CH = hour (0-23)
  4483.  CL = minutes (0-59)
  4484.  DH = seconds (0-59)
  4485.  DL = hundredths (0-99)
  4486.  
  4487.  
  4488.  on return:
  4489.  AL = 00 if time change successful
  4490.     = FF if time invalid
  4491.  
  4492.  
  4493.  - changes DOS maintained clock
  4494.  - DOS version 3.3+ also update CMOS clock where applicable
  4495.  
  4496. :int 21,2e
  4497. ^INT 21,2E - Set/Reset Verify Switch
  4498.  
  4499.  
  4500.  AH = 2E
  4501.  AL = 00 to set off
  4502.     = 01 to set verify on
  4503.  DH = 00 for DOS versions before 3.0
  4504.  
  4505.  
  4506.  returns nothing
  4507.  
  4508.  
  4509.  - with the verify setting on, disk I/O is more secure but
  4510.    takes longer to complete
  4511.  
  4512.  
  4513.  - see   INT 21,54
  4514.  
  4515. :int 21,2f
  4516. ^INT 21,2F - Get Disk Transfer Address (DTA)
  4517.  
  4518.  
  4519.  AH = 2F
  4520.  
  4521.  
  4522.  on return:
  4523.  ES:BX = pointer to current DTA
  4524.  
  4525.  
  4526.  - returns the DTA address
  4527.  - the default DTA is a 128 byte block at address 80h in the
  4528.    Program Segment Prefix (PSP).  This area also contains the
  4529.    command tail at program startup it must be saved or the DTA
  4530.    must be relocated before use to preserve the command tail
  4531.  
  4532.  - see   INT 21,1A   DTA
  4533.  
  4534. :int 21,30
  4535. ^INT 21,30 - Get DOS Version Number
  4536.  
  4537.  
  4538.  AH = 30h
  4539.  
  4540.  
  4541.  on return:
  4542.  AL = major version number (2-5)
  4543.  AH = minor version number (in hundredths)
  4544.  BX = 0
  4545.  CX = 0
  4546.  
  4547.  
  4548.  - for an example DOS version 2.1 returns AL=2 and AH=10
  4549.  - DOS versions prior to DOS 2.0 return zero in AH and AL
  4550.  - DOS version 4.0 and 4.1 usually return the same value of 4.00
  4551.  
  4552. :int 21,31
  4553. ^INT 21,31 - Terminate Process and Remain Resident
  4554.  
  4555.  
  4556.  AH = 31h
  4557.  AL = exit code (returned to batch files)
  4558.  DX = memory size in paragraphs to reserve
  4559.  
  4560.  
  4561.  returns nothing
  4562.  
  4563.  
  4564.  - preferred method for Terminate and Stay Resident programs
  4565.  - terminates process without releasing allocated memory and
  4566.    without closing open files
  4567.  - attempts allocation of memory specified in DX from memory
  4568.    allocated by DOS at startup.   INT 21,48 memory allocation
  4569.    is not affected
  4570.  
  4571.  - see   INT 27
  4572.  
  4573. :int 21,32
  4574. ^INT 21,32 - Get Pointer to Drive Parameter Table (Undocumented)
  4575.  
  4576.  AH = 32h
  4577.  DL = drive (0=default, 1=A:, 2=B:, 3=C:, ...)
  4578.  
  4579.  
  4580.  on return:
  4581.  AL =  FF if the drive number in DL was invalid
  4582.  DS:BX = address of drive parameter table (DPT)
  4583.  
  4584.  
  4585.  - available since DOS 2.0
  4586.  - used by DOS commands CHKDSK and RECOVER
  4587.  - forces a media check, which clears byte DS:[BX+17h] or
  4588.    DS:[BX+18h] in the Drive Parameter Table
  4589.  - actually accesses the disk, causing a critical error if a
  4590.    disk error occurs
  4591.  - can be used to determine if a drive is SUBST'ed by comparing
  4592.    DS:[BX+1] and DS:[BX] for a match.  If not equal, then the
  4593.    drive is possibly SUBST'ed (though not guaranteed)
  4594.    (may also indicate a Bernoulli box)
  4595.  - can be used to determine if a drive is a RAM disk;
  4596.    if (DS:[BX] != DS:[BX+1]) and (DS:[BX+1] == 0), then the disk
  4597.    is possibly a RAM disk (not guaranteed)
  4598.  
  4599.  - see   DPT   UNDOC
  4600.  
  4601. :int 21,33
  4602. ^INT 21,33 - Get/Set System Values (Ctl-Break/Boot Drive)
  4603.  
  4604.  
  4605.  AH = 33h
  4606.  AL = 00 to get current Ctrl-Break flag
  4607.     = 01 to set current Ctrl-Break flag
  4608.     = 05 get boot drive (DOS 4.x)
  4609.  DL = 00 to set Ctrl-Break checking off
  4610.     = 01 to set Ctrl-Break checking on
  4611.     = boot drive for subfunction 5;  (1=A:, 2=B:, ...)
  4612.  
  4613.  
  4614.  on return:
  4615.  DL = 00 Ctrl-Break checking OFF (AL=0)
  4616.     = 01 Ctrl-Break checking ON  (AL=0)
  4617.     = boot drive number (1-26, A: - Z:) (function 05)
  4618.  
  4619.  
  4620.  - retrieves DOS Ctrl-Break setting which determines if DOS
  4621.    will check for Ctrl-Break during INT 21 functions
  4622.  
  4623. :int 21,34:indos
  4624. ^INT 21,34 - Get Address to DOS Critical Flag
  4625. ^INDOS  (Undocumented)
  4626.  
  4627.  AH = 34h
  4628.  
  4629.  on return:
  4630.  ES:BX = address of a byte indicating whether a DOS call is
  4631.          in progress.  No DOS calls should be made if set.
  4632.  
  4633.  
  4634.  - AKA the INDOS flag, this critical section flag may be
  4635.    checked from within an interrupt handler before requesting
  4636.    a DOS service.   It is a semaphore that is non-zero when
  4637.    DOS is busy, and zero if DOS is free.
  4638.  - though this flag indicates whether a DOS interrupt is active,
  4639.    it should not be used alone to determine DOS is safe for re-entry
  4640.  - this interrupt should be used only during TSR initialization;
  4641.    the returned pointer should be used thereafter
  4642.  - this flag is cleared by a critical error (INT 24)
  4643.  - ES:BX-1 points to the critical error flag for DOS 3.x+
  4644.    ES:BX+1 points to the critical error flag for DOS 2.x
  4645.    ES:BX-1AA points to the critical error flag for COMPAQ DOS 3.0
  4646.  
  4647.  - see   UNDOC   INVARS   INT 21,52   INT 21,5D
  4648.  
  4649. :int 21,35
  4650. ^INT 21,35 - Get Interrupt Vector
  4651.  
  4652.  
  4653.  AH = 35h
  4654.  AL = interrupt vector number
  4655.  
  4656.  
  4657.  on return:
  4658.  ES:BX = pointer to interrupt handler
  4659.  
  4660.  
  4661.  - standard method for retrieving interrupt vectors
  4662.  
  4663.  
  4664.  - see   INT 21,25
  4665.  
  4666. :int 21,36
  4667. ^INT 21,36 - Get Disk Free Space
  4668.  
  4669.  
  4670.  AH = 36h
  4671.  DL = drive number (0=default, 1=A:)
  4672.  
  4673.  
  4674.  on return:
  4675.  AX = sectors per cluster
  4676.     = FFFF if drive is invalid
  4677.  BX = number of available clusters
  4678.  CX = number of bytes per sector
  4679.  DX = number of clusters per drive
  4680.  
  4681.  
  4682.  - used to determine available space on specified disk
  4683.  - see   INT 21,1B   INT 21,1C
  4684.  
  4685. :int 21,37
  4686. ^INT 21,37 - Get/Set Switch Character (Undocumented)
  4687.  
  4688.  
  4689.  AH = 37h
  4690.  AL = 0  get switch character into DL;  some systems return "-"
  4691.     = 1  set switch character to value in DL
  4692.     = 2  read device prefix flag into DL;  returns DL = 0 indicating
  4693.          devices must be accessed using /DEV/device. A non-zero value
  4694.          indicates devices are accessible without prefix
  4695.     = 3  set device prefix flag (DOS 2.x).  All device names must
  4696.          begin with \DEV\.
  4697.          DL = 0 clears flag
  4698.             = 1 sets flag
  4699.  
  4700.  on return:
  4701.  AL = FF  illegal function code specified
  4702.  
  4703.  
  4704.  - formerly available as a CONFIG.SYS command (DOS before 3.x)
  4705.  - see  UNDOC
  4706.  
  4707.  
  4708. :int 21,38
  4709. ^INT 21,38 - Get/Set Country Dependent Information
  4710.  
  4711.  AH = 38h
  4712.  AL = 00 to get current country information
  4713.     = 00-FE country codes  (DOS 3.x+)
  4714.     = FF for country codes >= FF, country codes are in BX
  4715.  BX = country code if AL = FF (country code > 255)
  4716.  DX = FFFF to set country information
  4717.  DS:DX = pointer to buffer to contain country data (if get data)
  4718.  
  4719.  on return:
  4720.  AX = error code if CF set
  4721.     = 02 invalid country
  4722.  BX = country code (DOS 3.x+)
  4723.  DS:DX = pointer to returned country data (see COUNTRY CODES)
  4724.  
  4725.  
  4726.  - returns a pointer to country specific data, for DOS 3.x+ this
  4727.    function can be used to also set this information
  4728.  
  4729.  - see   COUNTRY CODES
  4730.  
  4731. :int 21,39
  4732. ^INT 21,39 - Create Subdirectory (mkdir)
  4733.  
  4734.  
  4735.  AH = 39h
  4736.  DS:DX = pointer to ASCIIZ path name
  4737.  
  4738.  
  4739.  on return:
  4740.  CF = 0 if successful
  4741.     = 1 if error
  4742.  AX = error code  (see DOS ERROR CODES)
  4743.  
  4744.  
  4745.  - creates specified subdirectory
  4746.  - returns error if directory already exists, element of the path
  4747.    is not found, directory full or write protected disk
  4748.  
  4749. :int 21,3a
  4750. ^INT 21,3A - Remove Subdirectory (rmdir)
  4751.  
  4752.  
  4753.  AH = 3A
  4754.  DS:DX = pointer to ASCIIZ path name
  4755.  
  4756.  
  4757.  on return:
  4758.  CF = 0 if successful
  4759.     = 1 if error
  4760.  AX = error code  (see DOS ERROR CODES)
  4761.  
  4762.  
  4763.  - allows deletion of a subdirectory as long as it exists, is empty
  4764.    and not the current directory
  4765.  
  4766. :int 21,3b
  4767. ^INT 21,3B - Change Current Directory (chdir)
  4768.  
  4769.  
  4770.  AH = 3B
  4771.  DS:DX = pointer to ASCIIZ path name
  4772.  
  4773.  
  4774.  on return:
  4775.  CF = 0 if successful
  4776.     = 1 if error
  4777.  AX = error code if CF set  (see DOS ERROR CODES)
  4778.  
  4779.  
  4780.  - changes the current directory to the directory specified
  4781.    by pointer DS:DX
  4782.  
  4783. :int 21,3c
  4784. ^INT 21,3C - Create File Using Handle
  4785.  
  4786.  
  4787.  AH = 3C
  4788.  CX = file attribute  (see FILE ATTRIBUTES)
  4789.  DS:DX = pointer to ASCIIZ path name
  4790.  
  4791.  
  4792.  on return:
  4793.  CF = 0 if successful
  4794.     = 1 if error
  4795.  AX = files handle if successful
  4796.     = error code if failure  (see DOS ERROR CODES)
  4797.  
  4798.  
  4799.  - if file already exists, it is truncated to zero bytes on opening
  4800.  
  4801. :int 21,3d
  4802. ^INT 21,3D - Open File Using Handle
  4803.  
  4804.  AH = 3D
  4805.  AL = open access mode
  4806.       00  read only
  4807.       01  write only
  4808.       02  read/write
  4809.  DS:DX = pointer to an ASCIIZ file name
  4810.  
  4811.  on return:
  4812.  AX = file handle if CF not set
  4813.     = error code if CF set  (see DOS ERROR CODES)
  4814.  
  4815.  
  4816. %Access modes in AL:
  4817.  
  4818.  │7│6│5│4│3│2│1│0│  AL
  4819.   │ │ │ │ │ └─┴─┴──── read/write/update access mode
  4820.   │ │ │ │ └───────── reserved, always 0
  4821.   │ └─┴─┴────────── sharing mode (see below) (DOS 3.1+)
  4822.   └─────────────── 1 = private, 0 = inheritable (DOS 3.1+)
  4823.  
  4824.  
  4825. %Sharing mode bits (DOS 3.1+):          Access mode bits:
  4826. %654                                    210
  4827.  000  compatibility mode (exclusive)    000  read access
  4828.  001  deny others read/write access     001  write access
  4829.  010  deny others write access          010  read/write access
  4830.  011  deny others read access
  4831.  100  full access permitted to all
  4832.  
  4833.  
  4834.  - will open normal, hidden and system files
  4835.  - file pointer is placed at beginning of file
  4836.  
  4837. :int 21,3e
  4838. ^INT 21,3E - Close File Using Handle
  4839.  
  4840.  
  4841.  AH = 3E
  4842.  BX = file handle to close
  4843.  
  4844.  
  4845.  on return:
  4846.  AX = error code if CF set  (see DOS ERROR CODES)
  4847.  
  4848.  
  4849.  - if file is opened for update, file time and date stamp
  4850.    as well as file size are updated in the directory
  4851.  - handle is freed
  4852.  
  4853. :int 21,3f
  4854. ^INT 21,3F - Read From File or Device Using Handle
  4855.  
  4856.  
  4857.  AH = 3F
  4858.  BX = file handle
  4859.  CX = number of bytes to read
  4860.  DS:DX = pointer to read buffer
  4861.  
  4862.  
  4863.  on return:
  4864.  AX = number of bytes read is CF not set
  4865.     = error code if CF set  (see DOS ERROR CODES)
  4866.  
  4867.  
  4868.  - read specified number of bytes from file into buffer DS:DX
  4869.  - when AX is not equal to CX then a partial read occurred due
  4870.    to end of file
  4871.  - if AX is zero, no data was read, and EOF occurred before read
  4872.  
  4873. :int 21,40
  4874. ^INT 21,40 - Write To File or Device Using Handle
  4875.  
  4876.  
  4877.  AH = 40h
  4878.  BX = file handle
  4879.  CX = number of bytes to write
  4880.  DS:DX = pointer to write buffer
  4881.  
  4882.  
  4883.  on return:
  4884.  AX = number of bytes written if CF not set
  4885.     = error code if CF set  (see DOS ERROR CODES)
  4886.  
  4887.  
  4888.  
  4889.  - if AX is not equal to CX on return, a partial write occurred
  4890.  
  4891. :int 21,41
  4892. ^INT 21,41 - Delete File
  4893.  
  4894.  
  4895.  AH = 41h
  4896.  DS:DX = pointer to an ASCIIZ filename
  4897.  
  4898.  
  4899.  on return:
  4900.  AX = error code if CF set  (see DOS ERROR CODES)
  4901.  
  4902.  
  4903.  - marks first byte of file directory entry with E5 to indicate
  4904.    the file has been deleted.  The rest of the directory entry
  4905.    stays intact until reused.   FAT pointers are returned to DOS
  4906.  - does not accept wildcard in filename
  4907.  
  4908. :int 21,42
  4909. ^INT 21,42 - Move File Pointer Using Handle
  4910.  
  4911.  
  4912.  AH = 42h
  4913.  AL = origin of move:
  4914.       00 = beginning of file plus offset  (SEEK_SET)
  4915.       01 = current location plus offset  (SEEK_CUR)
  4916.       02 = end of file plus offset  (SEEK_END)
  4917.  BX = file handle
  4918.  CX = high order word of number of bytes to move
  4919.  DX = low order word of number of bytes to move
  4920.  
  4921.  
  4922.  on return:
  4923.  AX = error code if CF set  (see DOS ERROR CODES)
  4924.  DX:AX = new pointer location if CF not set
  4925.  
  4926.  
  4927.  - seeks to specified location in file
  4928.  - see   LSEEK   FSEEK
  4929.  
  4930. :int 21,43
  4931. ^INT 21,43 - Get/Set File Attributes
  4932.  
  4933.  AH = 43h
  4934.  AL = 00 to get attribute
  4935.     = 01 to set attribute
  4936.  DS:DX = pointer to an ASCIIZ path name
  4937.  CX = attribute to set
  4938.  
  4939.  │5│4│3│2│1│0│  CX  valid file attributes
  4940.   │ │ │ │ │ └──── 1 = read only
  4941.   │ │ │ │ └───── 1 = hidden
  4942.   │ │ │ └────── 1 = system
  4943.   │ └─┴─────── not used for this call
  4944.   └────────── 1 = archive
  4945.  
  4946.  
  4947.  on return:
  4948.  AX = error code if CF set  (see DOS ERROR CODES)
  4949.  CX = the attribute if AL was 00
  4950.  
  4951.  - see   DIRECTORY
  4952.  
  4953. :int 21,44
  4954. ^INT 21,44 - I/O Control for Devices  (IOCTL)
  4955.  
  4956. %Standard Call Format
  4957.  
  4958.  AH = 44h
  4959.  AL = function value
  4960.  BX = file handle
  4961.  BL = logical device number (0=default, 1=A:, 2=B:, 3=C:, ...)
  4962.  CX = number of bytes to read or write
  4963.  DS:DX = data or buffer
  4964.  
  4965.  
  4966.  on return:
  4967.  AX = error code if CF set
  4968.  AX = # of bytes transferred if CF not set
  4969.  
  4970.  
  4971. %See  IOCTL,n   where "n" is one of the following functions:
  4972.  
  4973.   0    Get Device Information
  4974.   1    Set Device Information
  4975.   2    Read From Character Device
  4976.   3    Write to Character Device
  4977.   4    Read From Block Device
  4978.   5    Write to Block Device
  4979.   6    Get Input Status
  4980.   7    Get Output Status
  4981.   8    Device Removable Query
  4982.   9    Device Local or Remote Query
  4983.   A    Handle Local or Remote Query
  4984.   B    Set Sharing Retry Count
  4985.   C    Generic I/O for Handles
  4986.   D    Generic I/O for Block Devices (3.2+)
  4987.   E    Get Logical Drive (3.2+)
  4988.   F    Set Logical Drive (3.2+)
  4989.  
  4990.  
  4991.  - see:  DEVICE COMMAND CODES
  4992.          DEVICE REQUEST HEADER
  4993.          DEVICE STATUS
  4994.          DEVICE HEADER
  4995.          DEVICE ATTRIBUTES
  4996.  
  4997. :int 21,44,0:ioctl,0
  4998. ^INT 21,44,0 / IOCTL,0 - Get Device Information
  4999.  
  5000.  AH = 44h
  5001.  AL = 00
  5002.  BX = handle (must be an opened device)
  5003.  
  5004.  
  5005.  on return
  5006.  AX = error code if CF set  (see DOS ERROR CODES)
  5007.  DX = device information  (see tables below)
  5008.  
  5009.  
  5010.  │F│E│D│C│B│A│9│8│7│6│5-0│  Block Device Information
  5011.   │ │ │ │ │ │ │ │ │ │  └───── drive number (0=A:,1=B:)
  5012.   │ │ │ │ │ │ │ │ │ └─────── 0 = file has been written
  5013.   │ │ │ │ │ │ │ │ └─────── 0 = disk file
  5014.   └─┴─┴─┴─┴─┴─┴─┴─────── reserved, must be zero
  5015.  
  5016.  │F│E│D-8│7│6│5│4│3│2│1│0│  Character Device Information
  5017.   │ │  │  │ │ │ │ │ │ │ └──── 1 = standard input device
  5018.   │ │  │  │ │ │ │ │ │ └──── 1 = standard output device
  5019.   │ │  │  │ │ │ │ │ └──── 1 = NUL device
  5020.   │ │  │  │ │ │ │ └──── 1 = clock device
  5021.   │ │  │  │ │ │ └──── reserved
  5022.   │ │  │  │ │ └──── 1 = binary mode, 0 = translated
  5023.   │ │  │  │ └──── 0 = end of file on input
  5024.   │ │  │  └──── 1 = character device, 0 if disk file
  5025.   │ │  └───── reserved, see DEVICE ATTRIBUTES
  5026.   │ └────── 1 = supports IOCTL, via functions 2 & 3
  5027.   └────── reserved
  5028.  
  5029.  
  5030.  - BIT 7 of register DX can be used to detect if STDIN/STDOUT is
  5031.    redirected to/from disk; if a call to this function has DX BIT 7
  5032.    set it's not redirected from/to disk; if it's clear then it is
  5033.    redirected to/from disk
  5034.  
  5035. :int 21,44,1:ioctl,1
  5036. ^INT 21,44,1 / IOCTL,1 - Set Device Information
  5037.  
  5038.  AH = 44h
  5039.  AL = 01
  5040.  BX = handle
  5041.  DH = must be zero
  5042.  DL = device data low order byte  (see below)
  5043.  
  5044.  
  5045.  on return
  5046.  AX = error code if CF set
  5047.  DX = device information  (see below)
  5048.  
  5049.  
  5050.  - applicable to character devices only
  5051.  - allows setting of device data word for character devices
  5052.  - usually used to change from binary to translated I/O
  5053.  - handle in BX must be an opened file or device
  5054.  
  5055.  
  5056. ^Device Data Word
  5057.  
  5058.  │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  Device Data Word
  5059.   │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └──── 1 = standard input device
  5060.   │ │ │ │ │ │ │ │ │ │ │ │ │ │ └──── 1 = standard output device
  5061.   │ │ │ │ │ │ │ │ │ │ │ │ │ └──── 1 = NUL device
  5062.   │ │ │ │ │ │ │ │ │ │ │ │ └──── 1 = clock device
  5063.   │ │ │ │ │ │ │ │ │ │ │ └──── reserved
  5064.   │ │ │ │ │ │ │ │ │ │ └──── 1 = binary mode, 0 = translated
  5065.   │ │ │ │ │ │ │ │ │ └──── 0 = end of file on input
  5066.   │ │ │ │ │ │ │ │ └──── 1 = character device
  5067.   └─┴─┴─┴─┴─┴─┴─┴──── reserved, must be zero
  5068.  
  5069.  
  5070. :int 21,44,2:ioctl,2
  5071. ^INT 21,44,2 / IOCTL,2 - Read From Character Device
  5072.  
  5073.  
  5074.  AH = 44h
  5075.  AL = 02
  5076.  BX = handle
  5077.  CX = number of bytes to read
  5078.  DS:DX = pointer to data buffer
  5079.  
  5080.  
  5081.  on return
  5082.  AX = number of bytes read if CF clear
  5083.     = error code if CF set   (see DOS ERROR CODES)
  5084.  
  5085.  
  5086.  - see bit 14 if IOCTL function 00h to determine if
  5087.    driver can support IOCTL control strings
  5088.  
  5089. :int 21,44,3:ioctl,3
  5090. ^INT 21,44,3 / IOCTL,3 - Write to Character Device
  5091.  
  5092.  
  5093.  AH = 44h
  5094.  AL = 03
  5095.  BX = handle
  5096.  CX = number of bytes to send
  5097.  DS:DX = pointer to data buffer
  5098.  
  5099.  
  5100.  on return
  5101.  AX = number of bytes written if CF clear
  5102.     = error code if CF set   (see DOS ERROR CODES)
  5103.  
  5104.  
  5105.  - see bit 14 if IOCTL function 00h to determine if
  5106.    driver can support IOCTL control strings
  5107.  
  5108. :int 21,44,4:ioctl,4
  5109. ^INT 21,44,4 / IOCTL,4 - Read from Block Device
  5110.  
  5111.  
  5112.  AH = 44h
  5113.  AL = 04
  5114.  BL = drive number (0=default, 1=A:, 2=B:, 3=C:, ...)
  5115.  CX = number of bytes to read
  5116.  DS:DX = pointer to data buffer
  5117.  
  5118.  
  5119.  on return
  5120.  AX = number of bytes read if CF clear
  5121.     = error code if CF set  (see DOS ERROR CODES)
  5122.  
  5123.  
  5124.  - block drivers are not required to support this function
  5125.  - returns AX = 01 (invalid function code) if not supported
  5126.  
  5127. :int 21,44,5:ioctl,5
  5128. ^INT 21,44,5 / IOCTL,5 - Write to Block Device
  5129.  
  5130.  
  5131.  AH = 44h
  5132.  AL = 05
  5133.  BL = drive number (0=default, 1=A:, 2=B:, 3=C:, ...)
  5134.  CX = number of bytes to send
  5135.  DS:DX = pointer to data buffer
  5136.  
  5137.  
  5138.  on return
  5139.  AX = number of bytes written if CF clear
  5140.     = error code if CF set  (see DOS ERROR CODES)
  5141.  
  5142.  
  5143.  - block devices are not required to support this function
  5144.  - returns AX = 01 (invalid function code) if not supported
  5145.  
  5146. :int 21,44,6:ioctl,6
  5147. ^INT 21,44,6 / IOCTL,6 - Get Input Status
  5148.  
  5149.  
  5150.  AH = 44h
  5151.  AL = 06
  5152.  BX = handle
  5153.  
  5154.  
  5155.  on return
  5156.  CF = 0 if successful
  5157.     = 1 if error
  5158.  AX = error code if CF set  (see DOS ERROR CODES)
  5159.  AL = 00  if EOF (files), or not ready (char devices)
  5160.     = FF  if not EOF (files), or ready (char devices)
  5161.  
  5162.  
  5163.  - used to determine if a file or device is ready for input
  5164.  - can be used to determine EOF unless EOF caused by INT 21,42
  5165.  
  5166. :int 21,44,7:ioctl,7
  5167. ^INT 21,44,7 / IOCTL,7 - Get Output Status
  5168.  
  5169.  
  5170.  AH = 44h
  5171.  AL = 07
  5172.  BX = handle
  5173.  
  5174.  
  5175.  on return
  5176.  CF = 0 if successful
  5177.     = 1 if error
  5178.  AX = error code if CF set  (see DOS ERROR CODES)
  5179.  AL = 00  if ready (files), or not ready (char devices)
  5180.     = FF  ready (files or char device)
  5181.  
  5182.  
  5183.  - indicates if a device or file is ready for output
  5184.  - files always return ready, character devices don't
  5185.  
  5186. :int 21,44,8:ioctl,8
  5187. ^INT 21,44,8 / IOCTL,8 - Device Removable Query
  5188.  
  5189.  AH = 44h
  5190.  AL = 08
  5191.  BL = drive number (0=default, 1=A:, 2=B:, 3=C:, ...)
  5192.  
  5193.  
  5194.  on return
  5195.  CF = 0 if successful
  5196.     = 1 if error
  5197.  AX = 00  removable media
  5198.     = 01  non-removable media
  5199.     = error code if CF set  (see DOS ERROR CODES)
  5200.  
  5201.  
  5202.  - used to determine if a device supports removable media
  5203.  - RAM disks are not considered removable media
  5204.  - device drivers compatible with DOS 2.0 do not always respond
  5205.    correctly to this query
  5206.  - implemented from DOS 3.0;  for earlier DOS versions drive A: and
  5207.    B: are removable media since DRIVER.SYS/SUBST are DOS 3.0+ only
  5208. :int 21,44,9:ioctl,9
  5209. ^INT 21,44,9 / IOCTL,9 - Device Local or Remote Query
  5210.  
  5211.  
  5212.  AH = 44h
  5213.  AL = 09
  5214.  BL = drive number (0=default, 1=A:, 2=B:, 3=C:, ...)
  5215.  
  5216.  
  5217.  on return
  5218.  AX = error code if CF set  (see DOS ERROR CODES)
  5219.  DX = device attribute word
  5220.       bit 12 = 1 if drive is remote
  5221.       bit 12 = 0 if drive is local
  5222.  
  5223.  
  5224.  - used to determine if block device is local or remote
  5225.  - returns invalid function if networking not started
  5226.  - implemented from DOS 3.1
  5227.  
  5228. :int 21,44,a:ioctl,a
  5229. ^INT 21,44,A / IOCTL,A - Handle Local or Remote Query
  5230.  
  5231.  
  5232.  AH = 44h
  5233.  AL = 0A
  5234.  BX = handle
  5235.  
  5236.  
  5237.  on return
  5238.  AX = error code if CF set  (see DOS ERROR CODES)
  5239.  DX = device attribute word
  5240.       bit 15 = 1 if drive is remote
  5241.       bit 15 = 0 if drive is local
  5242.  
  5243.  
  5244.  - used to determine if block device is local or remote
  5245.  - returns invalid function if networking not started
  5246.  - implemented from DOS 3.1
  5247.  
  5248. :int 21,44,b:ioctl,b
  5249. ^INT 21,44,B / IOCTL,B - Set Sharing Retry Count
  5250.  
  5251.  
  5252.  AH = 44h
  5253.  AL = 0B
  5254.  CX = pause between retries  (default 1)
  5255.  DX = number of retries  (default 3)
  5256.  
  5257.  
  5258.  on return
  5259.  AX = error code if CF set  (see DOS ERROR CODES)
  5260.  
  5261.  
  5262.  - retry parameters are associated with file locking
  5263.  - differences in CPU and clock speeds affect length of pauses
  5264.  - requires SHARE be loaded or invalid function is returned
  5265.  - implemented from DOS 3.0
  5266.  
  5267. :int 21,44,c:ioctl,c
  5268. ^INT 21,44,C / IOCTL,C - Generic I/O for Handles
  5269.  
  5270.  AH = 44h
  5271.  AL = 0C
  5272.  BX = handle
  5273.  CH = device type
  5274.     = 00  unknown device type  (DOS 3.3+)
  5275.     = 01  COMx  (DOS 3.3+)
  5276.     = 03  CON  (DOS 3.3+)
  5277.     = 05  LPTx  (DOS 3.3+),  printer  (DOS 3.2)
  5278.  CL = minor function code (when CH = 3 or CH = 5)
  5279.     = 45  set iteration count  (DOS 3.2 only)
  5280.  
  5281.     = 4A  select code page (DOS 3.3+); parameter format:
  5282.             00  word  length of data
  5283.             02  word  code page ID
  5284.             04 nwords character set data array (see offset 00)
  5285.  
  5286.     = 4C  code page prepare start  (DOS 3.3+); parameter format:
  5287.             00  word  flags
  5288.             02  word  length of remainder of parameter block
  5289.             04  word  number of code pages following
  5290.             06 nwords code page 1,...,N
  5291.  
  5292.     = 4D  code page prepare end  (DOS 3.3+); parameter format:
  5293.             00  word  length of data
  5294.             02  word  code page ID
  5295.  
  5296.     = 5F  set display info  (DOS 4.x, when CH=3); parameter format:
  5297.             00  byte  level  (0 for DOS 4.0)
  5298.             01  byte  reserved
  5299.             02  word  length of following data
  5300.             04  word  control flags
  5301.                       bit 0 set for blink, clear for intensity
  5302.                       bits 1 to 15 reserved
  5303.             06  byte  mode type (1=text, 2=graphics)
  5304.             07  byte  reserved
  5305.             08  word  colors;  0=monochrome, n=bits per pixel
  5306.             0A  word  pixel columns
  5307.             0C  word  pixel rows
  5308.             0E  word  character columns
  5309.             10  word  character rows
  5310.  
  5311.     = 65  get iteration count  (DOS 3.2 only)
  5312.  
  5313.     = 6A  query selected code page  (DOS 3.3+); parameter format:
  5314.             00  word  length of data
  5315.             02  word  code page ID
  5316.             04 nwords character set data array  (see offset 00)
  5317.  
  5318.     = 6B  query prepare list  (DOS 3.3+); Parameter format:
  5319.             00  word  length of following data
  5320.             02  word  number of hardware code pages
  5321.             04 nwords hardware code page array
  5322.             xx  word  number of prepared code pages
  5323.             xx nwords prepared code page array
  5324.  
  5325.     = 7F  get display info  (DOS 4.x, CH = 3)
  5326.             00  byte  level  (0 for DOS 4.0)
  5327.             01  byte  reserved
  5328.             02  word  length of following data
  5329.             04  word  control flags
  5330.                         bit 0 set for blink, clear for intensity
  5331.                         bits 1 to 15 reserved
  5332.             06  byte  mode type (1=text, 2=graphics)
  5333.             07  byte  reserved
  5334.             08  word  colors;  0=monochrome, n=bits per pixel
  5335.             0A  word  pixel columns
  5336.             0C  word  pixel rows
  5337.             0E  word  character columns
  5338.             10  word  character rows
  5339.  
  5340.  DS:DX = pointer to iteration count word  (DOS 3.2)
  5341.        = pointer to parameter block  (DOS 3.3)
  5342.  
  5343.  
  5344.  on return
  5345.  AX = error code if CF set  (see DOS ERROR CODES)
  5346.  
  5347.  
  5348.  - iteration count word specifies the number of times to retry
  5349.    an operation before aborting
  5350.  - DOS 3.3 changed this function to handle code page switching
  5351.  - implemented from DOS 3.2
  5352.  - DOS 4.x adds support for double byte characters
  5353.  - see IBM DOS Technical Reference Manual for more details
  5354.  
  5355. :int 21,44,d:ioctl,d
  5356. ^INT 21,44,D / IOCTL,D - Generic I/O for Block Devices
  5357.  
  5358.  AH = 44h
  5359.  AL = 0D
  5360.  BL = drive number (0=default, 1=A:, 2=B:, 3=C:, ...)
  5361.  CH = device type
  5362.     = 08 for disk drive  (block device)
  5363.  CL = minor function code
  5364.     = 40  set device parameters
  5365.     = 41  write track on logical device
  5366.     = 42  format/verify track on logical drive
  5367.     = 47  set access flag  (DOS 4.x)
  5368.     = 60  get device parameters
  5369.     = 61  read track on logical device
  5370.     = 62  verify track on logical drive
  5371.     = 67  get access flag  (DOS 4.x)
  5372.  DS:DX = pointer to parameter block
  5373.  
  5374.  
  5375.  on return
  5376.  AX = error code if CF set  (see DOS ERROR CODES)
  5377.  
  5378.  
  5379.  - provides device independent primitive control operations
  5380.  - implemented from DOS 3.2
  5381.  - see IBM DOS Technical Reference Manual for more details
  5382.  
  5383. :int 21,44,e:ioctl,e
  5384. ^INT 21,44,E / IOCTL,E - Get Logical Drive
  5385.  
  5386.  
  5387.  AH = 44h
  5388.  AL = 0E
  5389.  BL = physical drive number (0=default, 1=A:, 2=B:, 3=C:, ...)
  5390.  
  5391.  
  5392.  on return
  5393.  AX = error code if CF set  (see DOS ERROR CODES)
  5394.  AL = logical drive number assigned to physical drive
  5395.     = 0 if drive accessed by only one drive specifier
  5396.     = 1 if drive A:, 2 if drive B:, etc
  5397.  
  5398.  
  5399.  - used to determine the last drive designator used to access
  5400.    a drive if more than one logical drive designation applies
  5401.    to a device
  5402.  - implemented from DOS 3.2
  5403.  
  5404. :int 21,44,f:ioctl,f
  5405. ^INT 21,44,F / IOCTL,F - Set Logical Drive
  5406.  
  5407.  
  5408.  AH = 44h
  5409.  AL = 0F
  5410.  BL = new drive number (0=default, 1=A:, 2=B:, 3=C:, ...)
  5411.  
  5412.  
  5413.  on return
  5414.  AX = error code if CF set  (see DOS ERROR CODES)
  5415.  AL = logical drive number (should be equal to BL input)
  5416.     = 0 if drive accessed by only one drive specifier
  5417.     = 1 if drive A:, 2 if drive B:, etc
  5418.  
  5419.  
  5420.  
  5421.  - changes the logical drive designator of the physical drive
  5422.    to be accessed next
  5423.  - implemented from DOS 3.2
  5424.  
  5425. :int 21,45
  5426. ^INT 21,45 - Duplicate File Handle
  5427.  
  5428.  
  5429.  AH = 45h
  5430.  BX = file handle
  5431.  
  5432.  
  5433.  on return:
  5434.  AX = new file handle if CF not set
  5435.     = error code if CF set  (see DOS ERROR CODES)
  5436.  
  5437.  
  5438.  - gets another file handle for the same file
  5439.  - both file handles move in unison
  5440.  - often used to flush file data and update a file directory
  5441.    entry without closing the initial file
  5442.  
  5443. :int 21,46
  5444. ^INT 21,46 - Force Duplicate File Handle
  5445.  
  5446.  
  5447.  AH = 46h
  5448.  BX = existing file handle
  5449.  CX = second file handle
  5450.  
  5451.  
  5452.  on return:
  5453.  AX = error code if CF set  (see DOS ERROR CODES)
  5454.  
  5455.  
  5456.  - if file handle in CX is currently open, current file
  5457.    identified by CX is closed and the handle in BX is
  5458.    dupped and placed in CX
  5459.  - after duping file handles move together through file
  5460.  - similar to INT 21,45
  5461.  
  5462. :int 21,47
  5463. ^INT 21,47 - Get Current Directory
  5464.  
  5465.  
  5466.  AH = 47h
  5467.  DL = drive number (0 = default, 1 = A:)
  5468.  DS:SI = pointer to a 64 byte user buffer
  5469.  
  5470.  
  5471.  on return:
  5472.  DS:SI = pointer ASCIIZ directory path string
  5473.  AX = error code if CF set  (see DOS ERROR CODES)
  5474.  
  5475.  
  5476.  - returns the current directory relative to the root directory
  5477.  - the leading slash "\" and drive designator are omitted
  5478.  
  5479. :int 21,48
  5480. ^INT 21,48 - Allocate Memory
  5481.  
  5482.  AH = 48h
  5483.  BX = number of memory paragraphs requested
  5484.  
  5485.  
  5486.  on return:
  5487.  AX = segment address of allocated memory block (MCB + 1para)
  5488.     = error code if CF set  (see DOS ERROR CODES)
  5489.  BX = size in paras of the largest block of memory available
  5490.       if CF set, and AX = 08 (Not Enough Mem)
  5491.  CF = 0 if successful
  5492.     = 1 if error
  5493.  
  5494.  
  5495.  - returns segment address of allocated memory block AX:0000
  5496.  - each allocation requires a 16 byte overhead for the MCB
  5497.  - returns maximum block size available if error
  5498.  
  5499.  - see   MCB
  5500. :int 21,49
  5501. ^INT 21,49 - Free Allocated Memory
  5502.  
  5503.  
  5504.  AH = 49h
  5505.  ES = segment of the block to be returned (MCB + 1para)
  5506.  
  5507.  
  5508.  on return:
  5509.  AX = error code if CF set  (see DOS ERROR CODES)
  5510.  
  5511.  
  5512.  - releases memory and MCB allocated by INT 21,48
  5513.  - may cause unpredictable results is memory wasn't allocated
  5514.    using INT 21,48 or if memory not allocated to current process
  5515.  - checks for valid MCB id, but does NOT check for process ownership
  5516.  - care must be taken when freeing the memory of another process, to
  5517.    assure the segment isn't in use by a TSR or ISR
  5518.  
  5519. :int 21,4a
  5520. ^INT 21,4A - Modify Allocated Memory Block  (SETBLOCK)
  5521.  
  5522.  
  5523.  AH = 4A
  5524.  BX = new requested block size in paragraphs
  5525.  ES = segment of the block (MCB + 1 para)
  5526.  
  5527.  
  5528.  on return:
  5529.  AX = error code if CF set  (see DOS ERROR CODES)
  5530.  BX = maximum block size possible, if CF set and AX = 8
  5531.  
  5532.  
  5533.  - modifies memory blocks allocated by  INT 21,48
  5534.  - can be used by programs to shrink or increase the size
  5535.    of allocated memory
  5536.  
  5537. :int 21,4b:exec function
  5538. ^INT 21,4B - EXEC/Load and Execute Program
  5539.  
  5540.  AH = 4B
  5541.  AL = 00 to load and execute program
  5542.     = 01 (Undocumented)  create program segment prefix and load
  5543.          program, but don't execute.  The CS:IP and SS:SP of the
  5544.          program is placed in parameter block.  Used by debuggers
  5545.     = 03 load program only
  5546.  DS:DX = pointer to an ASCIIZ filename
  5547.  ES:BX = pointer to a parameter block
  5548.  
  5549.  
  5550.  on return:
  5551.  AX = error code if CF set  (see DOS ERROR CODES)
  5552.  ES:BX = pointer to parameter block similar to:
  5553.  
  5554. %Offset Size            Description
  5555.  
  5556.    00   word   segment of environment or zero if using parents env.
  5557.         word   segment of load point for overlay (if AL=3)
  5558.    02   dword  pointer to cmd line at PSP 80h
  5559.         word   relocation factor for EXE overlay (if AL=3)
  5560.    06   dword  pointer to default FCB passed at PSP 5Ch
  5561.    0A   dword  pointer to default FCB passes at PSP 6Ch
  5562.    0E   dword  value of program SS:SP
  5563.    12   dword  value of program CS:IP
  5564.  
  5565.  
  5566.  - allows execution of an external program as well as overlay
  5567.    management from within an application
  5568.  - all registers except CS and IP are destroyed
  5569.  - SS and SP should be preserved in code segment before call
  5570.    since a bug in DOS version 2.x destroys these
  5571.  - return code can be retrieved if child process exits via INT 21,4C
  5572.  - calling process must assure presence of enough unallocated memory
  5573.  - calls INT 21,55
  5574.  
  5575.  - see   PSP   UNDOC   INT 21,26   INT 21,55
  5576.  
  5577. :int 21,4c
  5578. ^INT 21,4C - Terminate Process With Return Code
  5579.  
  5580.  
  5581.  AH = 4C
  5582.  AL = return code (for batch files)
  5583.  
  5584.  
  5585.  returns nothing
  5586.  
  5587.  
  5588.  - approved method of program termination
  5589.  - restores the terminate, ctl-break, and critical error exit
  5590.    addresses, flushes all buffers, frees memory and returns to
  5591.    DOS via the termination handler address
  5592.  - does not close FCBs
  5593.  - this function is not supported in versions of DOS before 2.x,
  5594.    so to exit use  INT 21,0  or  INT 20.
  5595.  
  5596.  
  5597.  - see   INT 20   INT 27   INT 21,0   INT 21,31
  5598.  
  5599. :int 21,4d
  5600. ^INT 21,4D - Get Return Code of Sub-process
  5601.  
  5602.  
  5603.  AH = 4D
  5604.  
  5605.  
  5606.  on return:
  5607.  AH = system exit code  (indicates normal termination)
  5608.     = 00 for normal termination
  5609.     = 01 if terminated by ctl-break
  5610.     = 02 if critical device error
  5611.     = 03 if terminated by INT 21,31
  5612.  AL = child exit code
  5613.  
  5614.  
  5615.  - retrieve child process and system exit codes
  5616.  - this function can only be used to retrieve the exit code once
  5617.    multiple attempts to read exit codes will cause errors
  5618.  
  5619. :int 21,4e
  5620. ^INT 21,4E - Find First Matching File
  5621.  
  5622.  AH = 4E
  5623.  CX = attribute used during search  (see FILE ATTRIBUTES)
  5624.  DS:DX = pointer to ASCIIZ filespec, including wildcards
  5625.  
  5626.  
  5627.  on return:
  5628.  AX = error code if CF set  (see DOS ERROR CODE)
  5629.  DTA = data returned from call in the format:
  5630.  
  5631. %Offset Size      Description
  5632.  
  5633.    00   byte    attribute of search (undocumented)
  5634.    01   byte    drive used in search  (undocumented)
  5635.    02  11bytes  search name used (undocumented)
  5636.    0D   word    directory entry number (0 based, DOS 3.x+, undoc.)
  5637.    0F   word    starting cluster number of current directory
  5638.                 zero for root directory  (DOS 3.x+, undocumented)
  5639.    11   word    reserved (undocumented)
  5640.    13   word    starting cluster number of current directory
  5641.                 zero for root directory  (DOS 2.x+, undocumented)
  5642.    15   byte    attribute of matching file
  5643.    16   word    file time  (see FILE ATTRIBUTES)
  5644.    18   word    file date  (see FILE ATTRIBUTES)
  5645.    1A   word    file size
  5646.    1E 13bytes   ASCIIZ filename and extension in the form NAME.EXT
  5647.                 with blanks stripped
  5648.  
  5649.  - returns information on first file matching specifications
  5650.  - use INT 21,4F to retrieve following file matches
  5651.  - DOS 2.x cannot find . and .. entries, while DOS 3.x can
  5652.    unless they represent the root directory
  5653.  - normal files are always included along with files that match
  5654.    the requested attributes except when the LABEL attribute is
  5655.    requested.  It's up to the programmer to determine which
  5656.    actually match the requested attributes.
  5657.  - see   INT 21,1A   INT 21,4F   DTA   FILE ATTRIBUTES
  5658.  
  5659. :int 21,4f
  5660. ^INT 21,4F - Find Next Matching File
  5661.  
  5662.  
  5663.  AH = 4F
  5664.  DS:DX = unchanged from previous function 4E
  5665.  
  5666.  
  5667.  on return:
  5668.  AX = error code if CF set  (see DOS ERROR CODES)
  5669.  
  5670.  
  5671.  - INT 21,4E should be called to find the first file and this
  5672.    function should be called to find all other matching files
  5673.  - normal files are always included along with files that match
  5674.    the requested attributes except when the LABEL attribute is
  5675.    requested.  It's up to the programmer to determine which
  5676.    actually match the requested attributes.
  5677.  - see   INT 21,4E   INT 21,1A   DTA   FILE ATTRIBUTES
  5678.  
  5679. :int 21,50
  5680. ^INT 21,50 - Set Current Process ID  (Undocumented DOS 2.x)
  5681.  
  5682.  
  5683.  AH = 50h
  5684.  BX = process ID number (process PSP segment address)
  5685.  
  5686.  
  5687.  returns nothing
  5688.  
  5689.  
  5690.  - the process ID  number is actually the segment address
  5691.    of program's PSP.   This is useful for TSR's to access
  5692.    their own file handle table inside their PSP.
  5693.  
  5694.  - see   UNDOC   INT 21,51   INT 21,62
  5695.  
  5696. :int 21,51
  5697. ^INT 21,51 - Get Current Process ID  (Undocumented DOS 2.x)
  5698.  
  5699.  AH = 51h
  5700.  
  5701.  on return:
  5702.  BX = process ID
  5703.  
  5704.  
  5705.  - The process ID  number is actually the segment address
  5706.    of program's PSP.   This in conjunction with INT 21,50
  5707.    is useful for TSR's to access their own file handle table
  5708.    in their respective PSP.
  5709.  - INT 21,62 is highly recommended for DOS 3.x due to a
  5710.    possible bug when activated from a TSR.  DOS may switch to
  5711.    the wrong internal stack which may cause a problems with
  5712.    TSR's if called during an INT 28.
  5713.  
  5714.  - see INT 21,62 (Get PSP segment) for DOS 3.x applications
  5715.  - see   UNDOC   INT 21,50
  5716.  
  5717. :int 21,52:invars
  5718. ^INT 21,52 - Get Pointer to DOS "INVARS"  (Undocumented)
  5719.  
  5720.  AH = 52h
  5721.  
  5722.  on return:
  5723.  ES:BX = pointer to DOS "invars", a table of pointers used by DOS.
  5724.          Known "invars" fields follow (varies with DOS version):
  5725.  
  5726. %Offset Size              Description
  5727.  
  5728.   -12   word   sharing retry count (DOS 3.1+)
  5729.   -10   word   sharing retry delay  (DOS 3.1+)
  5730.    -8   dword  pointer to current disk buffer (DOS 3.x)
  5731.    -4   word   pointer in DOS code segment of unread CON input;
  5732.                0 indicates no unread input (DOS 3.x)
  5733.    -2   word   segment of first Memory Control Block
  5734.    00   dword  pointer to first DRIVE PARAMETER TABLE (A:) in chain
  5735.    04   dword  pointer to DOS System File Table (SFT)
  5736.    08   dword  pointer to $CLOCK device driver
  5737.    0C   dword  pointer to CON device driver
  5738.    10   byte   number of logical drives in system
  5739.    11   word   maximum bytes/block of any block device
  5740.    13   dword  pointer to DOS cache buffer header
  5741.    17 18bytes  NUL device header, first 4 bytes of device header
  5742.                point to the next device in device chain
  5743.  
  5744.  
  5745. ^DOS 3.0 Specific Information
  5746.  
  5747. %Offset Size             Description
  5748.  
  5749.    10   byte   number of block devices
  5750.    11   word   max sector size used by DOS prior to loading block
  5751.                device drivers;  limits allowable device sector size
  5752.    13   dword  pointer to DOS cache buffer header
  5753.    17   dword  pointer to drive information table
  5754.    1B   byte   value of LASTDRIVE command in CONFIG.SYS
  5755.    1C   dword  pointer to STRING= workspace area
  5756.    20   word   size of STRING area (CONFIG.SYS value of STRING=x)
  5757.    22   dword  FCB file table pointer
  5758.    26   word   number of protected FCBs
  5759.    28  18bytes NUL device header, first 4 bytes of device header
  5760.                point to the next device in device chain
  5761.  
  5762.  
  5763. ^DOS 3.1-3.3  Specific Information
  5764.  
  5765. %Offset Size              Description
  5766.  
  5767.    10   word   max sector size used by DOS prior to loading block
  5768.                device drivers;  limits allowable device sector size
  5769.    12   dword  pointer to DOS cache buffer header
  5770.    16   dword  pointer to drive information table
  5771.    1A   dword  FCB file table pointer
  5772.    1E   word   number of protected FCBs
  5773.    20   byte   number of block devices
  5774.    21   byte   value of LASTDRIVE command in CONFIG.SYS
  5775.    22  18bytes NUL device header, first 4 bytes of device header
  5776.                point to the next device in device chain
  5777.    34   byte   number of JOIN'ed drives
  5778.  
  5779.  
  5780. ^DOS 4.x  Specific Information
  5781.  
  5782. %Offset Size             Description
  5783.  
  5784.    10   word   max sector size used by DOS prior to loading block
  5785.                device drivers;  limits allowable device sector size
  5786.    12   dword  pointer to DOS cache buffer header
  5787.    16   dword  pointer to drive information table
  5788.    1A   dword  FCB file table pointer
  5789.    1E   word   number of protected FCBs
  5790.    20   byte   number of block devices
  5791.    21   byte   value of LASTDRIVE command in CONFIG.SYS (default 5)
  5792.    22  18bytes NUL device header, first 4 bytes of device header
  5793.                point to the next device in device chain
  5794.    34   byte   ???
  5795.    35   word   pointer within IBMDOS code segment to list of special
  5796.                program names
  5797.    37   dword  ???
  5798.    3B   dword  pointer to chain of installable file system drivers
  5799.    3F   word   the x in BUFFERS x,y (rounded up to multiple of 30
  5800.                if EMS is used)
  5801.    41   word   the y in BUFFERS x,y
  5802.    43   byte   boot drive (1=A:)
  5803.    44   byte   ???
  5804.    45   byte   extended memory size in K bytes
  5805.  
  5806.  
  5807.  - see   UNDOC   INDOS   MCB   SFT   DPT   INT 21,5D
  5808.  
  5809.  
  5810. :int 21,53
  5811. ^INT 21,53 - Generate Drive Parameter Table  (Undocumented)
  5812.  
  5813.  
  5814.  AH = 53h
  5815.  DS:SI = address of BIOS Parameter Block (BPB)
  5816.  ES:BP = pointer to first Drive Parameter Table in chain (DPT)
  5817.  
  5818.  
  5819.  returns nothing
  5820.  
  5821.  
  5822.  - available since DOS 2.0+
  5823.  - translates BPB DOS Disk Parameter Table
  5824.  - see   UNDOC   DPT   BPB   INT 21,32   INT  21,52
  5825.  
  5826. :int 21,54
  5827. ^INT 21,54 - Get Verify Setting
  5828.  
  5829.  
  5830.  AH = 54h
  5831.  
  5832.  
  5833.  on return:
  5834.  AL = 00  verify off
  5835.     = 01  verify on
  5836.  
  5837.  
  5838.  - returns value of disk read after write verification flag
  5839.  
  5840.  - see   INT 21,2E
  5841.  
  5842. :int 21,55
  5843. ^INT 21,55 - Create New PSP  (Undocumented)
  5844.  
  5845.  AH = 55h
  5846.  DX = New PSP segment address
  5847.  
  5848.  
  5849.  - the following should be observed when using this function
  5850.  
  5851.    o  Allocate memory for the PSP and program code  (INT 21,48)
  5852.    o  Duplicate the PSP   (INT 21,55)
  5853.    o  Load program code into allocated segment above the new PSP
  5854.    o  Save Current PSP
  5855.    o  Set PSP to the PSP just created  (INT 21,50)
  5856.    o  Jump to start of code if .COM otherwise handle relocation,
  5857.       setup stack and registers
  5858.  
  5859.  
  5860.  - similar to INT 21,26 except the PSP is setup by DOS
  5861.  - invoked by INT 21,4B
  5862.  
  5863.  - see   UNDOC   INT 21,4B   INT 21,26
  5864. :int 21,56
  5865. ^INT 21,56 - Rename File
  5866.  
  5867.  
  5868.  AH = 56h
  5869.  DS:DX = pointer to old ASCIIZ path/filename
  5870.  ES:DI = pointer to new ASCIIZ path/filename
  5871.  
  5872.  
  5873.  on return:
  5874.  AX = error code if CF set  (see DOS ERROR CODES)
  5875.  
  5876.  
  5877.  - supports full pathnames and allows renaming files across
  5878.    directories and in DOS 3.x allows renaming subdirectories
  5879.  - does not support use of wildcards
  5880.  - unpredictable result may occur if an opened file is renamed
  5881.  -
  5882.  
  5883. :int 21,57
  5884. ^INT 21,57 - Get/Set File Date and Time Using Handle
  5885.  
  5886.  AH = 57h
  5887.  AL = 00  get date and time
  5888.     = 01  set date and time
  5889.     = 02  ??? (DOS 4.0+)
  5890.     = 04  ??? (DOS 4.0+)
  5891.  BX = file handle
  5892.  CX = time to set (if setting)
  5893.  DX = date to set (if setting)
  5894.  
  5895.  
  5896.  on return:
  5897.  AX = error code if CF set  (see  DOS ERROR CODES)
  5898.  CX = file time (if reading, see below)
  5899.  DX = file date (if reading, see below)
  5900.  
  5901. %Time encoding:
  5902.  
  5903.  │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  Time in CX
  5904.   │ │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴────  two second incr (0-29)
  5905.   │ │ │ │ │ └─┴─┴─┴─┴─┴─────────────  minutes 0-59)
  5906.   └─┴─┴─┴─┴────────────────────────  hours (0-29)
  5907.  
  5908. %Date Encoding
  5909.  
  5910.  │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  Date in DX
  5911.   │ │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴────  day (1-31)
  5912.   │ │ │ │ │ │ │ └─┴─┴─┴─────────────  month (1-12)
  5913.   └─┴─┴─┴─┴─┴─┴────────────────────  year - 1980
  5914. :int 21,58
  5915. ^INT 21,58 - Get/Set Memory Allocation Strategy
  5916. ^(Undocumented, DOS 3.x)
  5917.  
  5918.  AH = 58h
  5919.  AL = 00  get strategy code
  5920.     = 01  set strategy code
  5921.  BX = strategy code (when AL = 01)
  5922.     = 00  first fit  (default)
  5923.     = 01  best fit
  5924.     = 02  last fit
  5925.  
  5926.  on return:
  5927.  AX = strategy code if CF clear
  5928.     = error if CF set
  5929.  
  5930.  - defaults to first fit, first block large enough is chosen
  5931.  - in first fit, DOS searches the MCB chain from low addresses to
  5932.    high for the first block large enough to fill the request.  For
  5933.    best fit, DOS searches all memory blocks for the closest fit.
  5934.    In last fit, DOS starts at high addresses and works downward
  5935.  
  5936.  - see   DOS ERROR CODES   UNDOC
  5937. :int 21,59
  5938. ^INT 21,59 - Get Extended Error Information (DOS 3.0+)
  5939.  
  5940.  AH = 59h
  5941.  BX = 00 for versions  3.0, 3.1, 3.2
  5942.  
  5943.  
  5944.  on return:
  5945.  AX = extended error code (see DOS ERROR CODES)
  5946.     = 0 if no error
  5947.  BH = error class
  5948.  BL = suggested action
  5949.  CH = locus
  5950.  
  5951.  
  5952.  - may be called after any  INT 21  function or from
  5953.    INT 24 when an error is returned
  5954.  - must be called immediately after the error occurs
  5955.  - registers CX, DX, DI, SI, BP, DS and ES are destroyed
  5956.  
  5957.  - see  DOS ERROR CODES
  5958. :int 21,5a
  5959. ^INT 21,5A - Create Temporary File  (DOS 3.0+)
  5960.  
  5961.  
  5962.  AH = 5A
  5963.  CX = attribute
  5964.  DS:DX = pointer to ASCIIZ path ending in '\'
  5965.  
  5966.  
  5967.  on return:
  5968.  AX = handle if call CF clear
  5969.     = error code if CF set  (see DOS ERROR CODES)
  5970.  DS:DX = pointer to updated ASCIIZ filespec
  5971.  
  5972.  
  5973.  - creates files with random names with any combination of
  5974.    the following attributes: normal, system and hidden
  5975.  - ending backslash is required
  5976.  
  5977. :int 21,5b
  5978. ^INT 21,5B - Create File  (DOS 3.0+)
  5979.  
  5980.  
  5981.  AH = 5B
  5982.  CX = attribute
  5983.  DS:DX = pointer to ASCIIZ path/filename
  5984.  
  5985.  
  5986.  on return:
  5987.  AX = handle if CF not set
  5988.     = error code if CF set  (see DOS ERROR CODES)
  5989.  
  5990.  
  5991.  - standard method of opening files
  5992.  - returns a file handle of a file opened with specified
  5993.    attributes (combinations of normal, system and hidden)
  5994.  
  5995. :int 21,5c
  5996. ^INT 21,5C - Lock/Unlock File Access  (DOS 3.0+)
  5997.  
  5998.  AH = 5C
  5999.  AL = 00  lock file
  6000.     = 01  unlock file
  6001.  BX = file handle
  6002.  CX = most significant word of region offset
  6003.  DX = least significant word of region offset
  6004.  SI = most significant word of region length
  6005.  DI = least significant word of region length
  6006.  
  6007.  
  6008.  on return:
  6009.  AX = error code if CF set  (see DOS ERROR CODES)
  6010.  
  6011.  
  6012.  - used for networking and multi-tasking system to preserve
  6013.    data integrity
  6014.  - duplicated handles inherit access to locked regions
  6015.  - EXEC'd programs do not inherit access to locked regions
  6016. :int 21,5d
  6017. ^INT 21,5D - Critical Error Information  (Undocumented, DOS 3.1+)
  6018.  
  6019.  AH = 5D
  6020.  AL = 00  copy data to DOS save area
  6021.     = 06  get address of critical flag into DS:SI
  6022.     = 0A  set extended error information
  6023.  DS:SI = pointer to 18 byte data block to be copied (AL = 00)
  6024.        = pointer to 9 byte data block of the form (AL = 0A):
  6025.  
  6026. %      Offset Size       Description
  6027.  
  6028.          00   word   extended error code to set
  6029.          02   dword  pointer to driver address to set
  6030.          06   byte   action code to set
  6031.          07   byte   class code to set
  6032.          08   byte   locus code to set
  6033.  
  6034.  on return:
  6035.  DS:SI = (AL = 6)address of critical flag of the form:
  6036.  
  6037. %      Offset Size      Description
  6038.  
  6039.          00   word   extended error code
  6040.          02   byte   action code
  6041.          03   byte   class code
  6042.          04   byte   pointer to driver address
  6043.  
  6044.  - function 0 copies 18 bytes from DS:SI to the DOS internal
  6045.    register-save area;  this data will be placed in the registers
  6046.    when DOS returns to the caller thereby circumventing the DOS
  6047.    register save logic
  6048.  - may be used by a TSR to prevent accidental changing of an error
  6049.    code and causing problems in the foreground process
  6050.  
  6051.  - see   INT 21,59   UNDOC
  6052.  
  6053. :int 21,5e
  6054. ^INT 21,5E  AL=0  Get Machine Name  (DOS 3.1+)
  6055.  
  6056.  AH = 5E
  6057.  AL = 00 get machine name (see AL=02 and AL=03)
  6058.  DS:DX = far pointer to buffer receiving name string
  6059.  
  6060.  
  6061.  on return:
  6062.  AX = error code if CF set, (invalid function)
  6063.  CH = 0  if name not defined
  6064.     > 0  if name defined
  6065.  CL = NETBIOS name number, if CH not 0
  6066.  DS:DX = far pointer to buffer containing string if CH not 0
  6067.  
  6068.  
  6069.  - returns pointer to an ASCIIZ string identifying the
  6070.    computer on a Microsoft network
  6071.  - output string is a 15 bytes long, padded with blanks and
  6072.    null terminated
  6073.  - unpredictable if called without file sharing loaded
  6074.  
  6075.  
  6076. ^INT 21,5E  AL=2  Set Printer Setup  (DOS 3.1+)
  6077.  
  6078.  
  6079.  AH = 5E
  6080.  AL = 02 set printer setup (see AL=0 and AL=3)
  6081.  BX = redirection list index (see INT 21,5F AL=2)
  6082.  CX = length of setup string
  6083.  DS:SI = far pointer to printer setup string
  6084.  
  6085.  
  6086.  on return:
  6087.  AX = error code if CF set, (invalid function)
  6088.  
  6089.  
  6090.  - see INT 21,5F subfunction 2 for information on obtaining
  6091.    the redirection list index
  6092.  - fails if file sharing is not loaded
  6093.  
  6094.  
  6095. ^INT 21,5E  AL=3  Get Printer Setup  (DOS 3.1+)
  6096.  
  6097.  
  6098.  AH = 5E
  6099.  AL = 03 get printer setup (see AL=0 and AL=2)
  6100.  BX = redirection list index (see INT 21,5F AL=2)
  6101.  ES:DI = far pointer to buffer to receive setup string
  6102.  
  6103.  
  6104.  on return:
  6105.  AX = error code if CF set, (invalid function)
  6106.  
  6107.  
  6108.  - see INT 21,5F subfunction 2 for information on obtaining
  6109.    the redirection list index
  6110.  - fails if file sharing is not loaded
  6111.  
  6112.  
  6113. :int 21,5f
  6114. ^INT 21,5F  AL=2  Get Redirection List Entry  (DOS 3.1+)
  6115.  
  6116.  AH = 5F
  6117.  AL = 02
  6118.  BX = redirection list index
  6119.  DS:SI = far pointer to a 16 byte buffer to hold device name
  6120.  ES:DI = far pointer to a 128 byte buffer to hold network name
  6121.  
  6122.  on return:
  6123.  AX = error code if CF is set
  6124.     = 1  invalid function code
  6125.     = 12 no more files
  6126.  BH = device status flag,
  6127.     bit 0 = 0  device valid
  6128.     bit 0 = 1  device invalid
  6129.  BL = device type
  6130.     = 3  printer
  6131.     = 4  drive
  6132.  CX = stored parameter value
  6133.  DS:SI = far pointer to ASCIIZ local device name
  6134.  ES:DI = far pointer to ASCIIZ network name
  6135.  
  6136.  - value returned in CX is the value previously passed to
  6137.    INT 21,5F with subfunction 3 in register CX
  6138.  - registers DX and BP are destroyed
  6139.  - fails if file sharing is not loaded
  6140.  
  6141.  
  6142. ^INT 21,5F  AL=3  Redirect Device  (DOS 3.1+)
  6143.  
  6144.  AH = 5F
  6145.  AL = 3
  6146.  BL = device type
  6147.     = 3 if printer
  6148.     = 4 if drive
  6149.  CX = parameter to save for caller
  6150.  DS:SI = far pointer to ASCIIZ local device name
  6151.  ES:DI = far pointer to ASCIIZ network name followed
  6152.          by ASCIIZ password
  6153.  
  6154.  on return
  6155.  AX = error code if CF is set
  6156.     = 1  invalid function code or
  6157.          invalid source or destination string format or
  6158.          source device already redirected
  6159.     = 3  path not found
  6160.     = 5  access denied
  6161.     = 8  insufficient memory
  6162.  
  6163.  - parameter passed in CX can later be retrieved by calls
  6164.    to INT 21,5F subfunction 2
  6165.  - local device name in DS:SI can be a drive designator
  6166.    (D:), a printer name (PRN or LPTx), or a null string
  6167.  - when a null string is followed by a password is used, DOS
  6168.    tries granting access to the network directory using the
  6169.    given password
  6170.  - fails if file sharing is not loaded
  6171.  
  6172.  
  6173. ^INT 21,5F  AL=4  Cancel Device Redirection  (DOS 3.1+)
  6174.  
  6175.  AH = 5F
  6176.  AL = 04
  6177.  DS:SI = far pointer to ASCIIZ local device name
  6178.  
  6179.  
  6180.  on return
  6181.  AX = error code if CF set
  6182.     = 01  function code invalid
  6183.           ASCIIZ string is not an existing source device
  6184.     = 0F  redirection paused on server
  6185.  
  6186.  
  6187.  - local device name in DS:SI can be a drive designator
  6188.    (D:), a printer name (PRN or LPTx), or a string beginning
  6189.    with 2 backslashes "\\"
  6190.  - when two backslashes are used for the string the connection
  6191.    between the local machine and network directory terminates
  6192.  - fails if file sharing is not loaded
  6193.  
  6194. :int 21,60
  6195. ^INT 21,60 - Get Fully Qualified File Name (Undocumented 3.x+)
  6196.  
  6197.  
  6198.  AH = 60h
  6199.  DS:SI = address of an ASCIIZ string containing unqualified filename
  6200.  ES:DI = address of a buffer to contain fully qualified filename
  6201.  
  6202.  
  6203.  on return:
  6204.  ES:DI = address of fully qualified filename string
  6205.  
  6206.  
  6207.  - undocumented, available in DOS 3.x+
  6208.  - does not check for file existence, simple provides a fully
  6209.    qualified filename for the given filespec.
  6210.  - see   UNDOC
  6211.  
  6212. :int 21,62
  6213. ^INT 21,62 - Get PSP address  (DOS 3.x)
  6214.  
  6215.  
  6216.  AH = 62h
  6217.  
  6218.  
  6219.  on return:
  6220.  BX = segment address of current process
  6221.  
  6222.  
  6223.  
  6224.  - this is useful for TSR's to access their own file handles
  6225.  - for DOS 2.x use INT 21,51
  6226.  
  6227.  
  6228.  - see   INT 21,51   INT 21,50
  6229.  
  6230. :int 21,63
  6231. ^INT 21,63 - Get Lead Byte Table  (MSDOS 2.25 only)
  6232.  
  6233.  
  6234.  AH = 63h
  6235.  AL = 00  get address of system lead byte table
  6236.     = 01  set or clear interim console flag
  6237.     = 02  get value of interim console flag
  6238.  DL = 00  if AL=01, clear interim console flag
  6239.     = 01  if AL=01, set interim console flag
  6240.  
  6241.  
  6242.  on return
  6243.  DL = value of interim console flag, function 02
  6244.  DS:SI = far pointer to lead byte table, function 00
  6245.  
  6246.  
  6247.  - available only in MSDOS 2.25
  6248.  - function 00, returns the address of system table containing
  6249.    legal lead byte ranges
  6250.  - function 01 and 02 set and get the interim console flag
  6251.  
  6252. :int 21,64
  6253. ^INT 21,64 - Set Device Driver Look Ahead  (Undocumented)
  6254.  
  6255.  
  6256.  AH = 64h
  6257.  AL = value for switch
  6258.       00 - causes DOS to perform look ahead to the device driver
  6259.            before execution of INT 21 functions 01, 08, and 0A
  6260.       other - no look ahead is performed
  6261.  
  6262.  
  6263.  returns ???
  6264.  
  6265.  
  6266.  - DOS internal; should not be called by user program
  6267.  - switch defaults to zero
  6268.  - undocumented; since DOS 3.3
  6269.  - see   UNDOC
  6270.  
  6271.  
  6272. :int 21,65
  6273. ^INT 21,65 - Get Extended Country Information (DOS 3.3+)
  6274.  
  6275.  
  6276.  AH = 65h
  6277.  AL = 01  get extended country information
  6278.     = 02  get pointer to character translation table
  6279.     = 04  get pointer to filename character translation table
  6280.     = 05  reserved
  6281.     = 06  Get pointer to collating sequence
  6282.     = 07  Get segment of DCBS vector (DOS 4.x)
  6283.  BX = code page (-1 = current)
  6284.  CX = amount of data to return
  6285.  DX = country ID (-1 = current)
  6286.  ES:DI = pointer to output buffer
  6287.  
  6288.  
  6289.  on return
  6290.  AX = error code if CF is set  (see DOS ERROR CODES)
  6291.  CX = amount of data returned
  6292.  ES:DI pointer to returned table
  6293.  
  6294.  
  6295. %Offset Size     Table for Function 01
  6296.  
  6297.    00   byte   country id = 01
  6298.    01   word   size (38 or less)
  6299.    03   word   country id
  6300.    05   word   code Page
  6301.    07   word   date Format
  6302.    09  5bytes  currency symbol string (ASCIIZ)
  6303.    0E  2bytes  thousands separator string (ASCIIZ)
  6304.    10  2bytes  decimal separator string (ASCIIZ)
  6305.    12  2bytes  date separator string (ASCIIZ)
  6306.    14  2bytes  time Separator string (ASCIIZ)
  6307.    16   byte   currency symbol location
  6308.    17   byte   currency decimal places
  6309.    18   byte   time format
  6310.    19   dword  extended ASCII map call address
  6311.    1D  2bytes  list separator string (ASCIIZ)
  6312.    1F  10bytes reserved
  6313.  
  6314.  
  6315. %Offset Size     Table for Function 2
  6316.    00   byte   country Id = 02
  6317.    01   dword  pointer to uppercase table
  6318.  
  6319.  
  6320. %Offset Size     Table for Function 4
  6321.    00   byte   country Id = 04
  6322.    01   dword  pointer to filename uppercase table
  6323.  
  6324.  
  6325. %Offset Size     Table for Function 6
  6326.    00   byte   country Id = 06
  6327.    01   dword  pointer to collating table
  6328.  
  6329.  
  6330. %Offset Size     Table for Function 7
  6331.    00   byte   country Id = 07
  6332.    01   dword  pointer to byte pair table
  6333.  
  6334.  
  6335. :int 21,66
  6336. ^INT 21,66 - Get/Set Global Code Page  (DOS 3.3+)
  6337.  
  6338.  
  6339.  AH = 66h
  6340.  AL = 01  get global code page
  6341.     = 02  set global code page
  6342.  BX = active code page if setting
  6343.  DX = system code page if setting
  6344.  
  6345.  
  6346.  on return
  6347.  AX = error code if CF set  (see DOS ERROR CODES)
  6348.  BX = active code page  (for AL=1 only)
  6349.  DX = system code page  (for AL=1 only)
  6350.  
  6351.  
  6352.  - moves country data from COUNTRY.SYS to country memory table
  6353.  
  6354. :int 21,67
  6355. ^INT 21,67 - Set Handle Count  (DOS 3.3+)
  6356.  
  6357.  AH = 67h
  6358.  BX = new maximum open handles allowed
  6359.  
  6360.  on return
  6361.  CF = 0 if successful
  6362.     = 1 if error
  6363.  AX = error code if CF is set  (see DOS ERROR CODES)
  6364.  
  6365.  
  6366.  - gives program control of the number of files simultaneously open
  6367.  - if CX is less than the current number of open files the change
  6368.    will take effect when the number of open handles falls below
  6369.    the new limit
  6370.  - this function allows the application to use more than 20 files,
  6371.    up to the FILES=N limit
  6372.  - earlier copies of IBM DOS 3.3 sometimes incorrectly allocates
  6373.    memory if an even number of handles is requested
  6374.  
  6375.  - see   SFT   FILE HANDLES
  6376. :int 21,68
  6377. ^INT 21,68 - Flush Buffer Using Handle  (DOS 3.3+)
  6378.  
  6379.  
  6380.  AH = 68h
  6381.  BX = file handle
  6382.  
  6383.  
  6384.  on return
  6385.  AX = error code if CF set  (see DOS ERROR CODES)
  6386.  
  6387.  
  6388.  - flushes DOS buffers to disk, does not update directory entry
  6389.  
  6390. :int 21,69
  6391. ^INT 21,69 - Get/Set Disk Serial Number  (Undocumented DOS 4+)
  6392.  
  6393.  AH = 69h
  6394.  AL = 00 get serial number
  6395.     = 01 set serial number
  6396.  BL = drive (0 = default, 1=A:, 2 = B:, ... )
  6397.  DS:DX = buffer to contain extended BIOS Parameter Block (AL=0)
  6398.        = disk information to set of the form:
  6399.  
  6400. %     Offset Size       Description
  6401.         00   word    info level (zero)
  6402.         02   dword   disk serial number (binary)
  6403.         06  11bytes  volume label or "NO NAME    " if not present
  6404.         11   8bytes  filesystem type string "FAT12   " or "FAT16   "
  6405.  
  6406.  returns:
  6407.  AX = error code if CF set; value destroyed otherwise
  6408.       1 - network drive not supported
  6409.       5 - non extended BPB on disk
  6410.  DS:DX = pointer to returned data, when AL = 0
  6411.  CF = 0 if successful
  6412.     = 1 if error
  6413.  
  6414.  
  6415.  - copies data from Extended BIOS Parameter Block to buffer
  6416.  - no critical error is generated on error
  6417.  - does not work on network drives
  6418.  
  6419.  - see   UNDOC   INT 21,59   BPB
  6420. :int 21,6c
  6421. ^INT 21,6C - Extended Open/Create  (DOS 4.x+)
  6422.  
  6423.  AH = 6C
  6424.  AL = 00
  6425.  BX = open mode (see below)
  6426.  CX = file attribute (see FILE ATTRIBUTES, bits 15-8 are zero)
  6427.  DX = function control indicator (see below)
  6428.  DS:SI = ASCIIZ filespec
  6429.  
  6430.  
  6431.  returns:
  6432.  AX = handle if CF clear
  6433.     = error code if CF set  (see DOS ERROR CODES)
  6434.  CX = 01  file opened
  6435.     = 02  file created and opened
  6436.     = 03  file truncated and opened (replaced)
  6437.  CF = 0 if successful
  6438.     = 1 if error
  6439.  
  6440.  
  6441. %Open Mode in BX:
  6442.  
  6443.  │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  BX  (Open Mode)
  6444.   │ │ │ │ │ │ │ │ │ │ │ │ │ └─┴─┴──── read/write access mode
  6445.   │ │ │ │ │ │ │ │ │ │ │ │ └──────── reserve (must be 0)
  6446.   │ │ │ │ │ │ │ │ │ └─┴─┴──────── sharing mode
  6447.   │ │ │ │ │ │ │ │ └──────────── 1 = private, 0 = inheritable
  6448.   │ │ │ └─┴─┴─┴─┴──────────── reserved
  6449.   │ │ └──────────────────── 0 = call INT 24, 1 = ignore INT 24
  6450.   │ └──────────────────── 0 = normal write, 1 = flush each write
  6451.   └──────────────────── reserved
  6452.  
  6453. %Read/Write Access bits:     Sharing Mode bits:
  6454. %210                           654
  6455.  000  read access              000  compatibility mode
  6456.  001  write access             001  read/write access
  6457.  010  read/write access        010  write access denied
  6458.                                011  read access denied
  6459.                                100  full access
  6460.  
  6461. %Function Control Indicator in DX:
  6462.  
  6463.  │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│  DX  (Function Control)
  6464.   │ │ │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴──── file existence behavior
  6465.   │ │ │ │ │ │ │ │ └─┴─┴─┴─────────── creation behavior
  6466.   └─┴─┴─┴─┴─┴─┴─┴────────────────── reserved
  6467.  
  6468. %File Existence Behavior bits:
  6469. %3210
  6470.  0000  if file exist, generate error, take no action
  6471.  0001  if file exists, open file
  6472.  0010  if file exists, truncate and open
  6473.  
  6474.  
  6475. %Creation Behavior bits:
  6476. %7654
  6477.  0000  if file does not exist, generate error, take no action
  6478.  0001  if file does not exist, create
  6479.  
  6480.  
  6481. :int 21,f8
  6482. ^INT 21,F8 - Set OEM Int 21 Handler (functions F9-FF, Undocumented)
  6483.  
  6484.  
  6485.  AH = F8
  6486.  DS:DX = pointer to OEM handler for INT 21H calls F9 through FF
  6487.        = FFFF:FFFF to reset to original handlers
  6488.  
  6489.  
  6490.  - DOS is set up to allow ONE handler for all 7 function calls.
  6491.    Any call to these handlers will set the CF and AX
  6492.    will contain 1 if they are not initialized.   The handling
  6493.    routine is passed all registers just as the user set them.
  6494.    The handler should exit with an IRET.
  6495.  - see   UNDOC
  6496.  
  6497. :int 22
  6498. ^INT 22 - Program Terminate
  6499.  
  6500.  
  6501.  no input data
  6502.  
  6503.  
  6504.  - not an interrupt, but a vector to the terminate address
  6505.  - copied to PSP offset 0Ah during program load
  6506.  - do not execute this interrupt directly
  6507.  
  6508.  
  6509.  - see   PSP
  6510.  
  6511. :int 23:ctrl-c
  6512. ^INT 23 - Control-Break Exit Address
  6513.  
  6514.  no input data
  6515.  
  6516.  - not an interrupt but a pointer to a routine that is called when a
  6517.    DOS function detects a Ctrl-Break or Ctrl-C has been pressed
  6518.    resulting in a "Break condition"
  6519.  - a Break condition is detected if DOS's internal Break flag is
  6520.    found set by INT 1B or the next word in the BIOS keyboard buffer
  6521.    is a scan code representing one of the Break key combinations.
  6522.    If a matching scan code is found, the keyboard buffer head pointer
  6523.    is incremented by 2 (which effectively removes the ^C keycode), the
  6524.    ^C is printed and then INT 23 is called.
  6525.  - disabling the abort is easy, but to disable the ^C from appearing
  6526.    you must either not use any of the DOS I/O functions that check
  6527.    for Break or you must trap the Ctrl-C keypress from within INT 9.
  6528.    Another method is to scan the BIOS keyboard buffer and delete any
  6529.    Break key combinations.
  6530.  - Ctrl-Break empties the keyboard buffer by resetting the keyboard
  6531.    head and tail pointers then places a 0000h at the queue head.  It
  6532.    then sets an internal "Break" flag.  DOS subfunctions that check
  6533.    for Break see this and then issue INT 23h.  DOS does not detect
  6534.    INT 1B using the keyboard buffer, but uses it's own internal flag.
  6535.  - Alt-Keypad-3 and Ctrl-2 also result in this interrupt
  6536.  - Ctrl-C places 2E03h in the BIOS keyboard buffer while Ctrl-2
  6537.    places 0300h and Alt-Keypad-3 places 0003h;  none of these key
  6538.    combinations empty the keyboard like Ctrl-Break but all result
  6539.    in a ^C being displayed;  note that all three produce scan codes
  6540.    containing '03'
  6541.  - since DOS checks only the first word of the keyboard buffer
  6542.    Ctrl-C, Ctrl-2 and Alt-Keypad-3 are only detected if they are the
  6543.    first word in the buffer while Ctrl-Break is detected via the
  6544.    internal flag and takes effect as soon as it's detected.
  6545.  - do not execute this interrupt directly
  6546.  
  6547.  - see   INT 1B    PSP   CTRL-BREAK   INT 9    HOW-DO-I
  6548.  
  6549. :int 24:critical error handler
  6550. ^INT 24 - Critical Error Handler
  6551.  
  6552.  no input data
  6553.  
  6554.  on entry to INT 24:
  6555.  AH = bit 7 of register AH is set to one if other than disk error
  6556.     = bit 7 of register AH is set to zero if disk error
  6557.       AL = failing drive number
  6558.       AH = bits 0-2 indicate affected disk area and read/write status
  6559.  
  6560.            │5│4│3│2│1│0│  AH
  6561.             │ │ │ │ │ └──── read = 0, write = 1
  6562.             │ │ │ └─┴───── 00=DOS, 01=FAT, 10=DIR, 11=data area
  6563.             │ │ └──────── 0=FAIL not allowed, 1=FAIL allowed
  6564.             │ └───────── 0=RETRY not allowed, 1=RETRY allowed
  6565.             └────────── 0=IGNORE not allowed, 1=IGNORE allowed
  6566.  
  6567.  DI = error code in lower byte
  6568.  BP:SI = pointer to device header control block where additional
  6569.          information about the error can be found
  6570.  
  6571.  
  6572.  on exit:
  6573.  AL = action code determining exit behavior
  6574.     = 00  ignore error
  6575.     = 01  retry
  6576.     = 02  terminate through INT 23
  6577.     = 03  fail system call (DOS 3.x+)
  6578.  
  6579.  
  6580. %Error Codes in low order byte of DI:
  6581.  
  6582.    00  write protect error
  6583.    01  unknown unit
  6584.    02  drive not ready
  6585.    03  unknown command
  6586.    04  data error (bad CRC)
  6587.    05  bad request structure length
  6588.    06  seek error
  6589.    07  unknown media type
  6590.    08  sector not found
  6591.    09  printer out of paper
  6592.    0A  write fault
  6593.    0B  read fault
  6594.    0C  general failure
  6595.  
  6596. %Users Stack at Entry to Error Handler:
  6597.  
  6598.  (top of stack)
  6599.      IP         DOS code next instruction pointer
  6600.      CS
  6601.      FLAGS      DOS's flags
  6602.      AX -\
  6603.      BX   \
  6604.      CX    \
  6605.      DX     \
  6606.      SI      |- User's registers at entry to INT 21 function
  6607.      DI     /
  6608.      BP    /
  6609.      DS   /
  6610.      ES -/
  6611.      IP         User code next instruction pointer
  6612.      CS
  6613.      FLAGS
  6614.  
  6615.  - on entry registers are setup for a retry operation
  6616.  - user routine must issue an IRET or simulate an IRET
  6617.  - INT 21,00 through INT 21,0C and INT 21,59 can safely be invoked
  6618.    from the handler.  Other calls may destroy DOS's stack
  6619.  - handler must preserve register SS,SP,DS,ES,BX,CX,DX
  6620.  - choosing ignore can show side effects, since it causes DOS
  6621.    to continue as if it the call were successful
  6622.  - if an improper action code is specified in DOS 3.x it is changed:
  6623.    if IGNORE is invalidly specified, action is converted to FAIL
  6624.    if RETRY is invalidly specified, action is converted to FAIL
  6625.    if FAIL is invalidly specified, action is converted to ABORT
  6626.  - IGNORE requests are converted to FAIL for FAT and DIR disk errors
  6627.    and network crritical errors
  6628.  - if the user routine wishes to handle the error instead of passing it
  6629.    to DOS, it must restore the user program registers from the stack
  6630.    and remove all the last 3 words from the stack (FLAGS, CS, IP)
  6631.    ad issue an IRET
  6632.    remove all registers from the stack
  6633.  - do not execute this interrupt directly
  6634.  - INDOS flag is cleared on INT 24 (see INT 21,34)
  6635.  
  6636.  
  6637. :int 25
  6638. ^INT 25 - Absolute Disk Read
  6639.  
  6640.  AL = logical drive number (0=A:, 1=B:, 2=C:, ...)
  6641.  CX = number of sectors to read
  6642.     = -1 if DOS 4.x (control block pointer is in DS:BX)
  6643.  DX = starting logical sector number (see below for DOS 4.x+)
  6644.  DS:BX = pointer to data buffer
  6645.        = pointer to control block (DOS 4.x+, see below)
  6646.  
  6647.  on return:
  6648.  AH = error code if CF set:
  6649.       01  bad command
  6650.       02  bad address mark
  6651.       03  write protect
  6652.       04  sector not found
  6653.       08  DMA failure
  6654.       10  data error (bad CRC)
  6655.       20  controller failed
  6656.       40  seek failed
  6657.       80  attachment failed to respond
  6658.  AL = BIOS error code if CF set
  6659.       00  write protect error
  6660.       01  unknown unit
  6661.       02  drive not ready
  6662.       03  unknown command
  6663.       04  data error (bad CRC)
  6664.       05  bad request structure length
  6665.       06  seek error
  6666.       07  unknown media type
  6667.       08  sector not found
  6668.       0A  write fault
  6669.       0B  read fault
  6670.       0C  general failure
  6671.  
  6672. ^Control Block Format (DOS 4.x):
  6673.  
  6674. %Offset Size        Description
  6675.  
  6676.    00   dword  starting sector
  6677.    04   word   number of sectors to read
  6678.    06   dword  pointer to buffer
  6679.  
  6680.  
  6681.  - reads disk sectors into buffer at DS:BX or DS:[BX+6]
  6682.  - after calling this interrupt the flags register remains on the
  6683.    stack and must be popped manually
  6684.  - sectors are logical sectors starting at the beginning of a
  6685.    logical disk; each DOS partition on a drive unit is considered
  6686.    one logical drive and has it's own logical sector numbers with
  6687.    track 0 starting at the first track in the partition
  6688.  - this function uses logical drives, and is susceptible to ASSIGN
  6689.  - physical sector numbers can be converted to and from DOS sector
  6690.    numbers with the following formulas:
  6691.  
  6692.    dos_sector = (sector - 1) + (head * sectors_per_track) +
  6693.                 (track * sectors_per_track * num_heads)
  6694.  
  6695.    physical_sector = 1 + (dos_sector  MOD  sectors_per_track)
  6696.    physical_head = (dos_sector / sectors_per_track)  MOD  num_heads
  6697.    physical_track = dos_sector / (sectors_per_track * num_heads)
  6698.  
  6699.  - see   INT 13,STATUS
  6700.  
  6701. :int 26
  6702. ^INT 26 - Absolute Disk Write
  6703.  
  6704.  AL = logical drive number (0=A:, 1=B:, 2=C:, ...)
  6705.  CX = number of sectors to write
  6706.     = -1 if DOS 4.x (control block pointer is in DS:BX)
  6707.  DX = starting logical sector number (see below for DOS 4.x+)
  6708.  DS:BX = pointer to data buffer
  6709.        = pointer to control block (DOS 4.x+, see below)
  6710.  
  6711.  on return:
  6712.  AH = error code if CF set:
  6713.       01  bad command
  6714.       02  bad address mark
  6715.       03  write protect
  6716.       04  sector not found
  6717.       08  DMA failure
  6718.       10  data error (bad CRC)
  6719.       20  controller failed
  6720.       40  seek failed
  6721.       80  attachment failed to respond
  6722.  AL = BIOS error code if CF set
  6723.       00  write protect error
  6724.       01  unknown unit
  6725.       02  drive not ready
  6726.       03  unknown command
  6727.       04  data error (bad CRC)
  6728.       05  bad request structure length
  6729.       06  seek error
  6730.       07  unknown media type
  6731.       08  sector not found
  6732.       0A  write fault
  6733.       0B  read fault
  6734.       0C  general failure
  6735.  
  6736. ^Control Block Format (DOS 4.x):
  6737.  
  6738. %Offset Size      Description
  6739.  
  6740.    00   dword  starting sector
  6741.    04   word   number of sectors to write
  6742.    06   dword  pointer to buffer
  6743.  
  6744.  
  6745.  - writes disk sectors from buffer at DS:BX or DS:[BX+6]
  6746.  - after calling this interrupt the flags register remains on the
  6747.    stack and must be popped manually
  6748.  - sectors are logical sectors starting at the beginning of a
  6749.    logical disk; each DOS partition on a drive unit is considered
  6750.    one logical drive and has it's own logical sector numbers with
  6751.    track 0 starting at the first track in the partition
  6752.  - this function uses logical drives, and is susceptible to ASSIGN
  6753.  - physical sector numbers can be converted to and from DOS sector
  6754.    numbers with the following formulas:
  6755.  
  6756.    dos_sector = (sector - 1) + (head * sectors_per_track) +
  6757.                 (track * sectors_per_track * num_heads)
  6758.  
  6759.    physical_sector = 1 + (dos_sector  MOD  sectors_per_track)
  6760.    physical_head = (dos_sector / sectors_per_track)  MOD  num_heads
  6761.    physical_track = dos_sector / (sectors_per_track * num_heads)
  6762.  
  6763.  - see   INT 13,STATUS
  6764. :int 27
  6765. ^INT 27 - Terminate and Stay Resident
  6766.  
  6767.  
  6768.  DX = offset of last byte in program to remain resident plus 1
  6769.  CS = segment of PSP
  6770.  
  6771.  
  6772.  returns nothing
  6773.  
  6774.  
  6775.  - terminates process without closing open files
  6776.  - memory beyond the offset in DX is freed
  6777.  
  6778.  
  6779.  - see   INT 21,31
  6780.  
  6781. :int 28:dos scheduler
  6782. ^INT 28 - DOS Idle Loop / Scheduler  (Undocumented)
  6783.  
  6784.  
  6785.  
  6786.  
  6787.  - issued by DOS during keyboard poll loop
  6788.  - indicates DOS may be carefully re-entered by TSR
  6789.  - used by TSR programs to popup and make DOS disk I/O calls
  6790.  - see   INDOS   UNDOC
  6791.  
  6792. :int 29
  6793. ^INT 29 - DOS Fast Character I/O  (Undocumented)
  6794.  
  6795.  
  6796.  AL = character to write
  6797.  
  6798.  
  6799.  returns nothing ???
  6800.  
  6801.  
  6802.  - used by DOS device drivers
  6803.  - similar to (int 21,2) and (int 21,9) but much faster
  6804.  - advances the cursor after character output
  6805.  - see   UNDOC
  6806.  
  6807. :int 2a
  6808. ^INT 2A - DOS Critical Section and NETBIOS
  6809.  
  6810. %Functions requested in AH; see also  INT 2A,N  where N is:
  6811.  
  6812.   00  Network presence test
  6813.   03  Network direct I/O test
  6814.   04  NETBIOS execute
  6815.   05  Get network information
  6816.  
  6817.  
  6818.  - subfunctions aren't currently listed in HelpPC but will be added
  6819.    shortly
  6820. :int 2e
  6821. ^INT 2E - Execute Command Using Base Level Command Interpreter
  6822. ^(Undocumented)
  6823.  
  6824.  DS:SI = ASCIIZ command string to be executed
  6825.  
  6826.  
  6827.  returns nothing ???
  6828.  
  6829.  - first byte of the string contains the string length, inclusive
  6830.  - command string should end with a CR
  6831.  - SS & SP should be preserved in your own code segment
  6832.  - available since DOS 2.x
  6833.  - can be used to modify parents environment with SET command
  6834.  - incompatible under some software multitasking systems
  6835.  - before returning to the parent program this interrupt will
  6836.    attempt to execute the "current" batch file (if the parent or
  6837.    any ancestors were invoked from a batch file.   This can cause
  6838.    remaining lines in a batch file to execute before the parent
  6839.    program finishes and fragment memory.
  6840.  
  6841.  - see   UNDOC
  6842. :int 2f:multiplex interrupt
  6843. ^INT 2F - DOS Multiplex Interrupt
  6844.  
  6845. %Function requested in AL; see also  INT 2F,N  where N is:
  6846.  
  6847.     0  Get installed state         │ ---- ERROR CODES ----
  6848.     1  Submit file                 │ 01  Invalid function
  6849.     2  Cancel file                 │ 02  File not found
  6850.     3  Cancel all files            │ 03  Path not found
  6851.     4  Pause / return status       │ 04  Too many files
  6852.     5  End of status               │ 05  Access denied
  6853.    2E  Error Translation Tables    │ 08  Queue full
  6854.                                    │ 09  Busy
  6855.                                    │ 0C  Name too long
  6856.                                    │ 0F  Invalid drive
  6857.  
  6858.  
  6859.  - see   INT 2F,0  for installation checks
  6860.  
  6861. :int 2f,0
  6862. ^INT 2F,0 - DOS Multiplex Interrupt - Get Installed State
  6863.  
  6864.  AL = 00
  6865.  AH = 01  PRINT
  6866.       02  ASSIGN
  6867.       10  SHARE
  6868.       11  Redirector/IFS is resident
  6869.       12  MultiDOS is resident
  6870.       13  Swap 13h and 19h
  6871.       14  NLSFUNC
  6872.       15  CD-ROM
  6873.       16  Windows 386
  6874.       17  DOS shell
  6875.       19  DOS 4.0 SHELLB.COM
  6876.       1A  ANSI.SYS (DOS 4.0+)
  6877.       1B  XMA2EMS.SYS
  6878.       40  OS/2 Compatibility box
  6879.       43  Himem XMS driver
  6880.       7A  Novell Netware IPX
  6881.       AD  DISPLAY.SYS internal (DOS 3.3+)
  6882.       AE  DOS 3.3+ internal
  6883.       B0  GRAFTABL.COM (DOS 3.3+)
  6884.       B4  IBM 3270 emulation
  6885.       B7  APPEND  (DOS 3.3+)
  6886.       B8  PCLAN network
  6887.       B9  PCLAN RECEIVER.COM
  6888.       BF  PCLAN REDIRIFS.EXE
  6889.       C0-FF reserved for user applications
  6890.  
  6891.  
  6892.  on return:
  6893.  AL = 00  not installed, ok to install
  6894.     = 01  not installed, do not install
  6895.     = FF  installed
  6896.  
  6897.  
  6898.  - the installed test for append returns non-zero if installed;
  6899.    zero if not installed
  6900.  
  6901.  
  6902. :int 2f,1:dos multiplex
  6903. ^INT 2F,1 - Multiplex Interrupt - Submit file
  6904.  
  6905.  
  6906.  AL = 01
  6907.  AH = 01  resident portion of PRINT
  6908.       02  resident portion of ASSIGN
  6909.       10  resident portion of SHARE
  6910.       B7  resident portion of APPEND
  6911.       C0-FF reserved for user applications
  6912.  DS:DX = pointer to a 5 byte packet containing an priority byte
  6913.          and a DWORD pointer to an ASCIIZ filename
  6914.  
  6915.  returns nothing
  6916.  
  6917.  
  6918.  
  6919. :int 2f,2
  6920. ^INT 2F,2 - Multiplex Interrupt - Cancel file
  6921.  
  6922.  
  6923.  AL = 02
  6924.  AH = 01  resident portion of PRINT
  6925.       02  resident portion of ASSIGN
  6926.       10  resident portion of SHARE
  6927.       B7  resident portion of APPEND
  6928.       C0-FF reserved for user applications
  6929.  DS:DX = pointer to ASCIIZ filename to cancel
  6930.  
  6931.  
  6932.  returns nothing
  6933.  
  6934.  
  6935.  - accepts wildcards
  6936.  
  6937. :int 2f,3
  6938. ^INT 2F,3 - Multiplex Interrupt - Cancel all files
  6939.  
  6940.  
  6941.  AL = 03
  6942.  AH = 01  resident portion of PRINT
  6943.       02  resident portion of ASSIGN
  6944.       10  resident portion of SHARE
  6945.       B7  resident portion of APPEND
  6946.       C0-FF reserved for user applications
  6947.  
  6948.  
  6949.  returns nothing
  6950.  
  6951. :int 2f,4
  6952. ^INT 2F,4 - Multiplex Interrupt - Pause / return status
  6953.  
  6954.  
  6955.  AL = 04
  6956.  AH = 01  resident portion of PRINT
  6957.       02  resident portion of ASSIGN
  6958.       10  resident portion of SHARE
  6959.       B7  resident portion of APPEND
  6960.       C0-FF reserved for user applications
  6961.  
  6962.  
  6963.  on return:
  6964.  DX = error count
  6965.  DS:SI = pointer to queue of files
  6966.  
  6967.  
  6968.  - each file in the queue is represented by 64 byte filename
  6969.  - the file currently being printed is the first entry in the queue
  6970.  - the last entry in the queue is a null string
  6971.  
  6972. :int 2f,5
  6973. ^INT 2F,5 - Multiplex Interrupt - End of Status
  6974.  
  6975.  
  6976.  AL = 05
  6977.  AH = 01  resident portion of PRINT
  6978.       02  resident portion of ASSIGN
  6979.       10  resident portion of SHARE
  6980.       B7  resident portion of APPEND
  6981.       C0-FF reserved for user applications
  6982.  
  6983.  
  6984.  on return:
  6985.  AH = error code  (see INT 2F)
  6986.  
  6987. :int 2f,2e
  6988. ^INT 2F,2E - Setup Error Code Translation Tables  (undoc. DOS 4.x+)
  6989.  
  6990.  
  6991.  - discovered in DOS 4.x by Jim Kyle, this function provides more
  6992.    detailed information on the pending critical error.
  6993.  
  6994. :int 33:mouse interrupt:mouse services
  6995. ^INT 33 - Mouse Function Calls
  6996.  
  6997. %Function request in AX;  see also  INT 33,N  where N is:
  6998.  
  6999.   00  Mouse Reset/Get Mouse Installed Flag
  7000.   01  Show Mouse Cursor
  7001.   02  Hide Mouse Cursor
  7002.   03  Get Mouse Position and Button Status
  7003.   04  Set Mouse Cursor Position
  7004.   05  Get Mouse Button Press Information
  7005.   06  Get Mouse Button Release Information
  7006.   07  Set Mouse Horizontal Min/Max Position
  7007.   08  Set Mouse Vertical Min/Max Position
  7008.   09  Set Mouse Graphics Cursor
  7009.   0A  Set Mouse Text Cursor
  7010.   0B  Read Mouse Motion Counters
  7011.   0C  Set Mouse User Defined Subroutine and Input Mask
  7012.   0D  Mouse Light Pen Emulation On
  7013.   0E  Mouse Light Pen Emulation Off
  7014.   0F  Set Mouse Mickey Pixel Ratio
  7015.   10  Mouse Conditional OFF
  7016.   13  Set Mouse Double Speed Threshold
  7017.   14  Swap interrupt subroutines
  7018.   15  Get mouse driver state and memory requirements
  7019.   16  Save mouse driver state
  7020.   17  Restore mouse driver state
  7021.   18  Set alternate subroutine call mask and address
  7022.   19  Get user alternate interrupt address
  7023.   1A  Set mouse sensitivity
  7024.   1B  Get mouse sensitivity
  7025.   1C  Set mouse interrupt rate (InPort only)
  7026.   1D  Set mouse CRT page
  7027.   1E  Get mouse CRT page
  7028.   1F  Disable mouse driver
  7029.   20  Enable mouse driver
  7030.   21  Reset mouse software
  7031.   22  Set language for messages
  7032.   23  Get language number
  7033.   24  Get driver version, mouse type & IRQ number
  7034.  
  7035.  
  7036.  - a mickey is 1/200 inches
  7037.  - for additional information see your vendor documentation
  7038.  - function number occupies all of AX rather than AH
  7039.  
  7040.  
  7041. ^Mouse functions can be broken down into the following classes:
  7042.  
  7043. %Mouse Driver Control / Feedback Functions
  7044.   00  Mouse Reset/Get Mouse Installed Flag
  7045.   15  Get Mouse Driver State and Memory Requirements
  7046.   16  Save Mouse Driver State
  7047.   17  Restore Mouse Driver State
  7048.   1C  Set Mouse Interrupt Rate (InPort only)
  7049.   1F  Disable Mouse Driver
  7050.   20  Enable Mouse Driver
  7051.   21  Reset Mouse Software
  7052.   24  Get Driver Version, Mouse Type & IRQ Number
  7053.  
  7054. %Mouse Cursor Control Functions
  7055.   01  Show Mouse Cursor
  7056.   02  Hide Mouse Cursor
  7057.   04  Set Mouse Cursor Position
  7058.   07  Set Mouse Horizontal Min/Max Position
  7059.   08  Set Mouse Vertical Min/Max Position
  7060.   09  Set Mouse Graphics Cursor
  7061.   0A  Set Mouse Text Cursor
  7062.   0F  Set Mouse Mickey Pixel Ratio
  7063.   10  Mouse Conditional OFF
  7064.   13  Set Mouse Double Speed Threshold
  7065.   1A  Set Mouse Sensitivity
  7066.   1B  Get Mouse Sensitivity
  7067.  
  7068. %Mouse Button and Position Feedback Functions
  7069.   03  Get Mouse Position and Button Status
  7070.   05  Get Mouse Button Press Information
  7071.   06  Get Mouse Button Release Information
  7072.   0B  Read Mouse Motion Counters
  7073.  
  7074. %Video Control and Feedback Functions
  7075.   1D  Set Mouse CRT Page
  7076.   1E  Get Mouse CRT Page
  7077.  
  7078. %Mouse Interrupt Setup Functions
  7079.   0C  Set Mouse User Defined Subroutine and Input Mask
  7080.   14  Swap Interrupt Subroutines
  7081.  
  7082. %Alternate Mouse Interrupt Setup Functions
  7083.   18  Set Alternate Subroutine Call Mask and Address
  7084.   19  Get User Alternate Interrupt Address
  7085.  
  7086. %Light Pen Emulation Functions
  7087.   0D  Mouse Light Pen Emulation On
  7088.   0E  Mouse Light Pen Emulation Off
  7089.  
  7090. %International Language Support Functions
  7091.   22  Set Language for Messages
  7092.   23  Get Language Number
  7093.  
  7094. :int 33,0
  7095. ^INT 33,0 - Mouse Reset/Get Mouse Installed Flag
  7096.  
  7097.  AX = 00
  7098.  
  7099.  
  7100.  on return:
  7101.  AX = 0000  mouse driver not installed
  7102.       FFFF  mouse driver installed
  7103.  BX = number of buttons
  7104.  
  7105.  
  7106.  - resets mouse to default driver values:
  7107.  
  7108.    .  mouse is positioned to screen center
  7109.    .  mouse cursor is reset and hidden
  7110.    .  no interrupts are enabled (mask = 0)
  7111.    .  double speed threshold set to 64 mickeys per second
  7112.    .  horizontal mickey to pixel ratio (8 to 8)
  7113.    .  vertical mickey to pixel ratio (16 to 8)
  7114.    .  max width and height are set to maximum for video mode
  7115. :int 33,1
  7116. ^INT 33,1 - Show Mouse Cursor
  7117.  
  7118.  
  7119.  AX = 01
  7120.  
  7121.  
  7122.  returns nothing
  7123.  
  7124.  
  7125.  - increments the cursor flag;  the cursor is displayed if flag
  7126.    is zero;  default flag value is -1
  7127.  
  7128. :int 33,2
  7129. ^INT 33,2 - Hide Mouse Cursor
  7130.  
  7131.  
  7132.  AX = 02
  7133.  
  7134.  
  7135.  returns nothing
  7136.  
  7137.  
  7138.  - decrements cursor flag; hides cursor if flag is not zero
  7139.  
  7140. :int 33,3
  7141. ^INT 33,3 - Get Mouse Position and Button Status
  7142.  
  7143.  
  7144.  AX = 03
  7145.  
  7146.  
  7147.  on return:
  7148.  CX = horizontal (X) position  (0..639)
  7149.  DX = vertical (Y) position  (0..199)
  7150.  BX = button status:
  7151.  
  7152.     │F-8│7│6│5│4│3│2│1│0│  Button Status
  7153.       │  │ │ │ │ │ │ │ └──── left button (1 = pressed)
  7154.       │  │ │ │ │ │ │ └───── right button (1 = pressed)
  7155.       └──┴─┴─┴─┴─┴─┴────── unused
  7156.  
  7157.  
  7158.  - values returned in CX, DX are the same regardless of video mode
  7159.  
  7160. :int 33,4
  7161. ^INT 33,4 - Set Mouse Cursor Position
  7162.  
  7163.  
  7164.  AX = 4
  7165.  CX = horizontal position
  7166.  DX = vertical position
  7167.  
  7168.  
  7169.  returns nothing
  7170.  
  7171.  
  7172.  - default cursor position is at the screen center
  7173.  - the position must be within the range of the current video mode
  7174.  - the position may be rounded to fit screen mode resolution
  7175.  
  7176. :int 33,5
  7177. ^INT 33,5 - Get Mouse Button Press Information
  7178.  
  7179.  
  7180.  AX = 5
  7181.  BX = 0  left button
  7182.       1  right button
  7183.  
  7184.  
  7185.  on return:
  7186.  BX = count of button presses (0-32767), set to zero after call
  7187.  CX = horizontal position at last press
  7188.  DX = vertical position at last press
  7189.  AX = status:
  7190.  
  7191.     │F-8│7│6│5│4│3│2│1│0│  Button Status
  7192.       │  │ │ │ │ │ │ │ └──── left button (1 = pressed)
  7193.       │  │ │ │ │ │ │ └───── right button (1 = pressed)
  7194.       └──┴─┴─┴─┴─┴─┴────── unused
  7195.  
  7196. :int 33,6
  7197. ^INT 33,6 - Get Mouse Button Release Information
  7198.  
  7199.  
  7200.  AX = 6
  7201.  BX = 0  left button
  7202.       1  right button
  7203.  
  7204.  
  7205.  on return:
  7206.  BX = count of button releases (0-32767), set to zero after call
  7207.  CX = horizontal position at last release
  7208.  DX = vertical position at last release
  7209.  AX = status
  7210.  
  7211.     │F-8│7│6│5│4│3│2│1│0│  Button status
  7212.       │  │ │ │ │ │ │ │ └──── left button (1 = pressed)
  7213.       │  │ │ │ │ │ │ └───── right button (1 = pressed)
  7214.       └──┴─┴─┴─┴─┴─┴────── unused
  7215.  
  7216. :int 33,7
  7217. ^INT 33,7 - Set Mouse Horizontal Min/Max Position
  7218.  
  7219.  
  7220.  AX = 7
  7221.  CX = minimum horizontal position
  7222.  DX = maximum horizontal position
  7223.  
  7224.  
  7225.  returns nothing
  7226.  
  7227.  
  7228.  - restricts mouse horizontal movement to window
  7229.  - if min value is greater than max value they are swapped
  7230.  
  7231. :int 33,8
  7232. ^INT 33,8 - Set Mouse Vertical Min/Max Position
  7233.  
  7234.  
  7235.  AX = 8
  7236.  CX = minimum vertical position
  7237.  DX = maximum vertical position
  7238.  
  7239.  
  7240.  returns nothing
  7241.  
  7242.  
  7243.  - restricts mouse vertical movement to window
  7244.  - if min value is greater than max value they are swapped
  7245.  
  7246. :int 33,9
  7247. ^INT 33,9 - Set Mouse Graphics Cursor
  7248.  
  7249.  
  7250.  AX = 9
  7251.  BX = horizontal hot spot (-16 to 16)
  7252.  CX = vertical hot spot (-16 to 16)
  7253.  ES:DX = pointer to screen and cursor masks (16 byte bitmap)
  7254.  
  7255.  
  7256.  returns nothing
  7257.  
  7258.  
  7259.  - screen mask is AND'ed to screen Cursor Mask is XOR'ed
  7260.  - bytes 0-7 form the screen mask bitmap
  7261.  - bytes 8-F form the cursor mask bitmap
  7262.  
  7263. :int 33,a
  7264. ^INT 33,A - Set Mouse Text Cursor
  7265.  
  7266.  
  7267.  AX = 0A
  7268.  BX = 00  software cursor
  7269.       01  hardware cursor
  7270.  CX = start of screen mask or hardware cursor scan line
  7271.  DX = end of screen mask or hardware cursor scan line
  7272.  
  7273.  
  7274.  returns nothing
  7275.  
  7276. :int 33,b
  7277. ^INT 33,B - Read Mouse Motion Counters
  7278.  
  7279.  
  7280.  AX = 0B
  7281.  
  7282.  
  7283.  on return:
  7284.  CX = horizontal mickey count (-32768 to 32767)
  7285.  DX = vertical mickey count (-32768 to 32767)
  7286.  
  7287.  
  7288.  - count values are 1/200 inch intervals (1/200 in. = 1 mickey)
  7289.  
  7290. :int 33,c
  7291. ^INT 33,C - Set Mouse User Defined Subroutine and Input Mask
  7292.  
  7293.  AX = 0C
  7294.  ES:DX = far pointer to user interrupt
  7295.  CX = user interrupt mask:
  7296.  
  7297.     │F-5│4│3│2│1│0│ user interrupt mask in CX
  7298.       │  │ │ │ │ └─── cursor position changed
  7299.       │  │ │ │ └──── left button pressed
  7300.       │  │ │ └───── left button released
  7301.       │  │ └────── right button pressed
  7302.       │  └─────── right button released
  7303.       └───────── unused
  7304.  
  7305.  returns nothing
  7306.  
  7307.  
  7308.  - routine at ES:DX is called if an event occurs and the
  7309.    corresponding bit specified in user mask is set
  7310.  - routine at ES:DX receives parameters in the following
  7311.    registers:
  7312.  
  7313.    AX = condition mask causing call
  7314.    CX = horizontal cursor position
  7315.    DX = vertical cursor position
  7316.    DI = horizontal counts
  7317.    SI = vertical counts
  7318.    DS = mouse driver data segment
  7319.    BX = button state:
  7320.  
  7321.       │F-2│1│0│
  7322.         │  │ └─── left button (1 = pressed)
  7323.         │  └──── right button (1 = pressed)
  7324.         └────── unused
  7325.  
  7326.  - initial call mask and user routine should be restore on exit
  7327.    from user program
  7328.  - user program may need to set DS to it's own segment
  7329.  - see   INT 33,14
  7330.  
  7331. :int 33,d
  7332. ^INT 33,D - Mouse Light Pen Emulation On
  7333.  
  7334.  
  7335.  AX = 0D
  7336.  
  7337.  
  7338.  returns nothing
  7339.  
  7340.  
  7341.  - turns on light pen emulation;  the light pen is considered
  7342.    down when both buttons are down;   when both buttons are
  7343.    up the pen is considered off screen
  7344.  
  7345.  - see   INT 33,E
  7346.  
  7347. :int 33,e
  7348. ^INT 33,E - Mouse Light Pen Emulation Off
  7349.  
  7350.  
  7351.  AX = 0E
  7352.  
  7353.  
  7354.  returns nothing
  7355.  
  7356.  
  7357.  - disables light pen emulation
  7358.  
  7359.  - see   INT 33,D
  7360.  
  7361. :int 33,f
  7362. ^INT 33,F - Set Mouse Mickey Pixel Ratio
  7363.  
  7364.  
  7365.  AX = 0F
  7366.  CX = horizontal ratio (1..32767, default 8)
  7367.  DX = vertical ratio (1..32767, default 16)
  7368.  
  7369.  
  7370.  returns nothing
  7371.  
  7372.  
  7373.  - sets the ratio between physical cursor movement (mickeys) and
  7374.    screen coordinate changes
  7375.  - CX and DX must be unsigned (high bit must be 0)
  7376.  
  7377. :int 33,10
  7378. ^INT 33,10 - Mouse Conditional OFF
  7379.  
  7380.  
  7381.  AX = 10h
  7382.  CX = upper X screen coordinate
  7383.  DX = upper Y screen coordinate
  7384.  SI = lower X screen coordinate
  7385.  DI = lower Y screen coordinate
  7386.  
  7387.  
  7388.  returns nothing
  7389.  
  7390.  
  7391.  - defines screen region for updating in which the mouse is hidden
  7392.    if found these coordinates (INT 33,1 must be used to turn cursor
  7393.    on again)
  7394.  
  7395.  - see  INT 33,1
  7396.  
  7397. :int 33,13
  7398. ^INT 33,13 - Set Mouse Double Speed Threshold
  7399.  
  7400.  
  7401.  AX = 13h
  7402.  DX = threshold speed (mickeys per second, default 64)
  7403.  
  7404.  
  7405.  returns nothing
  7406.  
  7407.  
  7408.  - cursor speed is doubled when the cursor moves across the screen
  7409.    at the threshold speed
  7410.  
  7411. :int 33,14
  7412. ^INT 33,14 - Swap Interrupt Subroutines
  7413.  
  7414.  AX = 14h
  7415.  ES:DX = far pointer to user routine
  7416.  CX = user interrupt mask:
  7417.  
  7418.     │F-8│7│6│5│4│3│2│1│0│ user interrupt mask in CX
  7419.       │  │ │ │ │ │ │ │ └─── cursor position changed
  7420.       │  │ │ │ │ │ │ └──── left button pressed
  7421.       │  │ │ │ │ │ └───── left button released
  7422.       │  │ │ │ │ └────── right button pressed
  7423.       │  │ │ │ └─────── right button released
  7424.       └──┴─┴─┴──────── unused
  7425.  
  7426.  on return:
  7427.  CX = previous user interrupt mask
  7428.  ES:DX = far pointer to previous user interrupt
  7429.  
  7430.  - routine at ES:DX is called if an event occurs and the
  7431.    corresponding bit specified in user mask is set
  7432.  - routine at ES:DX receives parameters in the following
  7433.    registers:
  7434.  
  7435.    AX = condition mask causing call
  7436.    CX = horizontal cursor position
  7437.    DX = vertical cursor position
  7438.    DI = horizontal counts
  7439.    SI = vertical counts
  7440.    DS = mouse driver data segment
  7441.    BX = button state:
  7442.  
  7443.       │F-2│1│0│
  7444.         │  │ └─── left button (1 = pressed)
  7445.         │  └──── right button (1 = pressed)
  7446.         └────── unused
  7447.  
  7448.  - initial call mask and user routine should be restore on exit
  7449.    from user program
  7450.  - user program may need to set DS to it's own segment
  7451.  - see   INT 33,C
  7452.  
  7453. :int 33,15
  7454. ^INT 33,15 - Get Mouse Driver State and Memory Requirements
  7455.  
  7456.  
  7457.  AX = 15h
  7458.  
  7459.  
  7460.  on return
  7461.  BX = buffer size need to hold current mouse state
  7462.  
  7463.  
  7464.  - used before mouse functions 16h and 17h to determine memory
  7465.    needed to save mouse state before giving up control of mouse
  7466.    to another program
  7467.  
  7468. :int 33,16
  7469. ^INT 33,16 - Save Mouse Driver State
  7470.  
  7471.  
  7472.  AX = 16h
  7473.  ES:DX = far pointer to mouse state save buffer
  7474.  
  7475.  
  7476.  returns nothing
  7477.  
  7478.  
  7479.  - used to save mouse information before relinquishing control
  7480.    to another programs mouse handler
  7481.  - see INT 33,15   INT 33,17
  7482.  
  7483. :int 33,17
  7484. ^INT 33,17 - Restore Mouse Driver State
  7485.  
  7486.  
  7487.  AX = 17h
  7488.  ES:DX = far pointer to mouse state save buffer
  7489.  
  7490.  
  7491.  returns nothing
  7492.  
  7493.  
  7494.  - used to restore mouse information after regaining control
  7495.    from another programs mouse handler
  7496.  - see INT 33,15   INT 33,16
  7497.  
  7498. :int 33,18
  7499. ^INT 33,18 - Set alternate subroutine call mask and address
  7500.  
  7501.  AX = 18h
  7502.  DX = offset to function
  7503.  CX = user interrupt mask:
  7504.  
  7505.     │F-8│7│6│5│4│3│2│1│0│ user interrupt mask in CX
  7506.       │  │ │ │ │ │ │ │ └─── alt key pressed during event
  7507.       │  │ │ │ │ │ │ └──── ctrl key pressed during event
  7508.       │  │ │ │ │ │ └───── shift key pressed during event
  7509.       │  │ │ │ │ └────── right button up event
  7510.       │  │ │ │ └─────── right button down event
  7511.       │  │ │ └──────── left button up event
  7512.       │  │ └───────── left button down event
  7513.       │  └────────── cursor moved
  7514.       └──────────── unused
  7515.  
  7516.  - entire mask is set to zero when INT 33,0 is called
  7517.  - up to three handlers may be defined with this call
  7518.  - mask should be cleared before program exit
  7519.  - when handler is called it receives parameters in the following
  7520.    registers:
  7521.  
  7522.    AX = condition mask causing call
  7523.    CX = horizontal cursor position
  7524.    DX = vertical cursor position
  7525.    DI = horizontal counts
  7526.    SI = vertical counts
  7527.    DS = mouse driver data segment
  7528.    BX = button state:
  7529.  
  7530.       │F-2│1│0│
  7531.         │  │ └─── left button (1 = pressed)
  7532.         │  └──── right button (1 = pressed)
  7533.         └────── unused
  7534.  
  7535. :int 33,19
  7536. ^INT 33,19 - Get User Alternate Interrupt Address
  7537.  
  7538.  AX = 19h
  7539.  CX = user interrupt call mask (see below)
  7540.  
  7541.  
  7542.  on return:
  7543.  BX:DX = user interrupt vector
  7544.  CX = user interrupt call mask or zero if not found
  7545.  
  7546.     │F-8│7│6│5│4│3│2│1│0│ user interrupt mask in CX
  7547.       │  │ │ │ │ │ │ │ └─── alt key pressed during event
  7548.       │  │ │ │ │ │ │ └──── ctrl key pressed during event
  7549.       │  │ │ │ │ │ └───── shift key pressed during event
  7550.       │  │ │ │ │ └────── right button up event
  7551.       │  │ │ │ └─────── right button down event
  7552.       │  │ │ └──────── left button up event
  7553.       │  │ └───────── left button down event
  7554.       │  └────────── cursor moved
  7555.       └──────────── unused
  7556.  
  7557.  - returns vector to function defined by INT 33,18
  7558.  - searches the event handlers defined by INT 33,18 for a routine
  7559.    with a call mask matching CX
  7560.  
  7561. :int 33,1a
  7562. ^INT 33,1A - Set Mouse Sensitivity
  7563.  
  7564.  
  7565.  AX = 1A
  7566.  BX = horizontal coordinates per pixel  (≤ 100)
  7567.  CX = vertical coordinates per pixel  (≤ 100)
  7568.  DX = double speed threshold
  7569.  
  7570.  
  7571.  returns nothing
  7572.  
  7573.  
  7574.  - sets mouse sensitivity by setting the ratio of the mouse
  7575.    coordinates per screen pixel
  7576.  - provides same results as calls to both INT 33,F and INT 33,13
  7577.  - these values are not reset by INT 33,0
  7578.  - see   INT 33,F    INT 33,13
  7579.  
  7580.  
  7581. :int 33,1b
  7582. ^INT 33,1B - Get Mouse Sensitivity
  7583.  
  7584.  
  7585.  AX = 1B
  7586.  
  7587.  
  7588.  on return:
  7589.  BX = horizontal coordinates per pixel  (≤ 100)
  7590.  CX = vertical coordinates per pixel  (≤ 100)
  7591.  DX = double speed threshold
  7592.  
  7593.  
  7594.  - returns mouse sensitivity information as the number of mouse
  7595.    coordinates per screen pixel
  7596.  
  7597. :int 33,1c
  7598. ^INT 33,1C - Set Mouse Interrupt Rate  (InPort only)
  7599.  
  7600.  
  7601.  AX = 1C
  7602.  BX = rate code
  7603.     = 0  no interrupts
  7604.     = 1  30 interrupts per second
  7605.     = 2  50 interrupts per second
  7606.     = 3  100 interrupts per second
  7607.     = 4  200 interrupts per second
  7608.  
  7609.  
  7610.  
  7611.  - work with the InPort mouse only
  7612.  - sets the rate the mouse status is polled by the mouse driver
  7613.  - faster rates provide better resolution but take away CPU time
  7614.  - values in BX > 4 can cause unpredicatable results
  7615.  
  7616. :int 33,1d
  7617. ^INT 33,1D - Set Mouse CRT Page
  7618.  
  7619.  
  7620.  AX = 1D
  7621.  BX = CRT page number
  7622.  
  7623.  
  7624.  returns nothing
  7625.  
  7626.  
  7627.  - sets the CRT page which the mouse cursor is displayed
  7628.  - see VIDEO PAGES
  7629.  
  7630. :int 33,1e
  7631. ^INT 33,1E - Get Mouse CRT Page
  7632.  
  7633.  
  7634.  AX = 1E
  7635.  
  7636.  
  7637.  on return:
  7638.  BX = CRT page number cursor is displayed on
  7639.  
  7640.  
  7641.  - see VIDEO PAGES
  7642.  
  7643. :int 33,1f
  7644. ^INT 33,1F - Disable Mouse Driver
  7645.  
  7646.  
  7647.  AX = 1F
  7648.  
  7649.  
  7650.  on return:
  7651.  AX = 001F if successful
  7652.       FFFF if error
  7653.  ES:BX = previous INT 33 vector
  7654.  
  7655.  
  7656.  - restores vectors for INT 10 and INT 71 (8088/86) or INT 74 (286+)
  7657.  - INT 33 interrupt vector (software) is not affected
  7658.  - use of the vector returned in ES:BX to restore the previous INT 33
  7659.    vector can cause problems since it contains the value of INT 33
  7660.    before the driver was installed; any other hooks into INT 33 set
  7661.    after driver installation will not receive service
  7662.  
  7663. :int 33,20
  7664. ^INT 33,20 - Enable Mouse Driver
  7665.  
  7666.  
  7667.  AX = 20h
  7668.  
  7669.  
  7670.  returns nothing
  7671.  
  7672.  
  7673.  - reinstalls the mouse drivers interrupt vectors for INT 10 and
  7674.    INT 71 (8088/86) and INT 74 (286/386)
  7675.  - see INT 33,1F
  7676.  
  7677. :int 33,21
  7678. ^INT 33,21 - Reset Mouse Software
  7679.  
  7680.  AX = 21h
  7681.  
  7682.  on return:
  7683.  AX = 0021  mouse driver not installed
  7684.       FFFF  mouse driver installed
  7685.  BX = 2  mouse driver installed
  7686.  
  7687.  - similar to INT 33,0 but does not reset the mouse hardware or
  7688.    display variables
  7689.  - both AX and BX must be correct for successful reset
  7690.  - interrupt routines set through INT 33,18 are preserved
  7691.  - resets the mouse to the following defaults:
  7692.  
  7693.    .  mouse is positioned to screen center
  7694.    .  mouse cursor is reset and hidden
  7695.    .  no interrupts are enabled (mask = 0)
  7696.    .  double speed threshold set to 64 mickeys per second
  7697.    .  horizontal mickey to pixel ratio (8 to 8)
  7698.    .  vertical mickey to pixel ratio (16 to 8)
  7699.    .  max width and height are set to maximum for video mode
  7700.  
  7701. :int 33,22
  7702. ^INT 33,22 - Set Language for Messages
  7703.  
  7704.  AX = 22h
  7705.  BX = language number (with /L switch value):
  7706.     = 0  English     n/a
  7707.     = 1  French      F
  7708.     = 2  Dutch       NL
  7709.     = 3  German      D
  7710.     = 4  Swedish     S
  7711.     = 5  Finnish     SF
  7712.     = 6  Spanish     E
  7713.     = 7  Portuguese  P
  7714.     = 8  Italian     I
  7715.  
  7716.  
  7717.  returns nothing
  7718.  
  7719.  
  7720.  - only works with international version of the mouse driver
  7721.  - see   INT 33,23
  7722. :int 33,23
  7723. ^INT 33,23 - Get Language Number
  7724.  
  7725.  AX = 23h
  7726.  
  7727.  
  7728.  on return:
  7729.  BX = language number (with /L switch value):
  7730.     = 0  English     n/a
  7731.     = 1  French      F
  7732.     = 2  Dutch       NL
  7733.     = 3  German      D
  7734.     = 4  Swedish     S
  7735.     = 5  Finnish     SF
  7736.     = 6  Spanish     E
  7737.     = 7  Portuguese  P
  7738.     = 8  Italian     I
  7739.  
  7740.  - only works with international version of the mouse driver
  7741.  - returns English (0) if not international version
  7742.  
  7743.  - see   INT 33,22
  7744. :int 33,24
  7745. ^INT 33,24 - Get Driver Version, Mouse Type & IRQ Number
  7746.  
  7747.  AX = 24h
  7748.  
  7749.  
  7750.  on return:
  7751.  BH = major version (see below)
  7752.  BL = minor version (see below)
  7753.  CH = mouse type:
  7754.     = 1  bus mouse
  7755.     = 2  serial mouse
  7756.     = 3  InPort mouse
  7757.     = 4  PS/2  mouse
  7758.     = 5  Hewlett Packard mouse
  7759.  CL = IRQ number:
  7760.     = 0  PS/2
  7761.     = 2  IRQ 2
  7762.     = 5  IRQ 5
  7763.     = 7  IRQ 7
  7764.  
  7765.  - version 6.1 would be represented as BH = 06h, BL = 10h
  7766. :int 4a
  7767. ^INT 4A - RTC Alarm Handler Vector
  7768.  
  7769.  
  7770.  - not a true interrupt, but a pointer to an alarm handler routine
  7771.  - called by  INT 70  and enabled by INT 1A,6
  7772.  - routine must exit via IRET
  7773.  
  7774. :int 67:ems services
  7775. ^INT 67 - Expanded Memory Specification
  7776.  
  7777. %Function requested in AH; see also  INT 67,N  where N is:
  7778.  
  7779.       40  Get EMM Status
  7780.       41  Get Page Frame Base Address
  7781.       42  Get Page Counts
  7782.       43  Get Handle and Allocate Pages
  7783.       44  Map Logical Page Into Physical Page Window
  7784.       45  Release Handle and Memory Pages
  7785.       46  Get EMM Version
  7786.       47  Save Page Map Context
  7787.       48  Restore Page Map Context
  7788.       49  Get I/O Port Addresses
  7789.       4A  Get Logical to Physical Page Mapping
  7790.       4B  Get Handle Count
  7791.       4C  Get Page Count for Handle
  7792.       4D  Get Page Count for All Handles
  7793.       4E  Get/Set Page Map Context
  7794.       4F  Get/Set Partial Page Map
  7795.       50  Map/Unmap Multiple Handle Pages
  7796.       51  Reallocate Pages
  7797.       52  Get/Set Handle Attributes
  7798.       53  Get/Set Handle Name
  7799.       54  Get Handle Directory
  7800.       55  Alter Page Map and Jump
  7801.       56  Alter Page Map and Call
  7802.       57  Move/Exchange Memory Region
  7803.       58  Get Mappable Physical Address Array
  7804.       59  Get Expanded Memory Hardware Information
  7805.       5A  Allocate Standard/Raw Pages
  7806.       5B  Alternate Map Register Set DMA Registers
  7807.       5C  Prepare Expanded Memory for Warm Boot
  7808.       5D  Enable/Disable OS Functions
  7809.       60  Get Physical Window Array
  7810.  
  7811.  
  7812.  - see   EMS STATUS
  7813.  
  7814. :int 67,40:ems status
  7815. ^INT 67,40 - Get EMM Status  (LIM EMS 3.0+)
  7816.  
  7817.  AH = 40h
  7818.  
  7819.  on return:
  7820.  AH = status
  7821.  
  7822.       00  success
  7823.       80  internal software error
  7824.       81  hardware malfunction
  7825.       83  unallocated or invalid handle
  7826.       84  undefined function requested
  7827.       85  no handles available
  7828.       86  error in save or restore of mapping context
  7829.       87  more pages requested than physically exist
  7830.       88  more pages requested than currently available
  7831.       89  zero pages requested
  7832.       8A  invalid logical page number
  7833.       8B  illegal physical page number
  7834.       8C  context stack out of memory
  7835.       8D  context save failed, handle already has context stack
  7836.       8E  context restore failed, no context stack for handle
  7837.       8F  invalid subfunction
  7838.       90  undefined attribute type
  7839.       91  feature not supported
  7840.       92  success, portion of the source region was overwritten
  7841.       93  length of source or destination region exceeds length of
  7842.           region allocated to either source or destination handle
  7843.       94  conventional and expanded memory regions overlap
  7844.       95  offset within logical page exceeds size of logical page
  7845.       96  region length exceeds 1M
  7846.       97  source and destination regions have same handle and overlap
  7847.       98  memory source or destination type undefined
  7848.       9A  specified DMA register set not supported ???
  7849.           specified alternate map register set not supported
  7850.       9B  all DMA register sets currently allocated ???
  7851.           all alternate map register sets currently allocated
  7852.       9C  alternate DMA sets not supported ???
  7853.           alternate map register sets not supported
  7854.       9D  undefined or unallocated DMA register set ???
  7855.           undefined or unallocated alternate map register set
  7856.       9E  dedicated DMA channels not supported
  7857.       9F  specified dedicated DMA channel not supported
  7858.       A1  duplicate handle name
  7859.       A2  attempted to wrap around 1Mb conventional address space
  7860.       A3  contents of partial page map corrupted or count of
  7861.           mappable segments exceeds total mappable segments
  7862.       A4  operating system denied access
  7863.  
  7864.  
  7865.  - registers not listed are preserved
  7866.  - should only be used after establishing that the EMS driver
  7867.    is present
  7868. :int 67,41
  7869. ^INT 67,41 - Get Page Frame Base Address  (LIM EMS 3.0+)
  7870.  
  7871.  
  7872.  AH = 41h
  7873.  
  7874.  
  7875.  on return:
  7876.  AH = 00 success
  7877.     = error code (see EMS STATUS)
  7878.  BX = segment of page frame (PFBA)
  7879.  
  7880.  
  7881.  - use this to determine where in the 1Mb memory address the page
  7882.    frame will be mapped
  7883.  - registers not listed are preserved
  7884.  
  7885. :int 67,42
  7886. ^INT 67,42 - Get Page Counts  (LIM EMS 3.2+)
  7887.  
  7888.  
  7889.  AH = 42h
  7890.  
  7891.  
  7892.  on return:
  7893.  AH = 00  success
  7894.     = error code (see EMS STATUS)
  7895.  BX = number of unallocated or available pages
  7896.  DX = total number of pages in EMM system
  7897.  
  7898.  
  7899.  - registers not listed are preserved
  7900.  
  7901. :int 67,43
  7902. ^INT 67,43 - Get Handle and Allocate Pages  (LIM EMS 3.2+)
  7903.  
  7904.  
  7905.  AH = 43h
  7906.  BX = number of logical pages to allocate
  7907.  
  7908.  
  7909.  on return:
  7910.  AH = 00  success
  7911.     = error code (see EMS STATUS)
  7912.  DX = EMM handle
  7913.  
  7914.  
  7915.  - handles not explicitly closed by the application are not
  7916.    recoverable on exit from the program
  7917.  - registers not listed are preserved
  7918.  
  7919. :int 67,44
  7920. ^INT 67,44 - Map Logical Page Into Physical Page Window (LIM EMS)
  7921.  
  7922.  
  7923.  AH = 44h
  7924.  AL = physical page number (0-3)
  7925.  BX = logical page number (0 to total allocated minus 1)
  7926.  DX = EMM handle
  7927.  
  7928.  
  7929.  on return:
  7930.  AH = 00  success
  7931.     = error code (see EMS STATUS)
  7932.  
  7933.  
  7934.  - registers not listed are preserved
  7935.  
  7936. :int 67,45
  7937. ^INT 67,45 - Release Handle and Memory Pages  (LIM EMS)
  7938.  
  7939.  
  7940.  AH = 45h
  7941.  DX = EMM handle
  7942.  
  7943.  
  7944.  on return:
  7945.  AH = 00 success
  7946.     = error code (see EMS STATUS)
  7947.  
  7948.  
  7949.  - handles must be explicitly freed by an application or the memory
  7950.    will not be available to the following applications
  7951.  - if unsuccessful, the operation should be retried
  7952.  - registers not listed are preserved
  7953.  
  7954. :int 67,46
  7955. ^INT 67,46 - Get EMM Version  (LIM EMS)
  7956.  
  7957.  
  7958.  AH = 46h
  7959.  
  7960.  
  7961.  on return:
  7962.  AH = 00  success
  7963.     = error code (see EMS STATUS)
  7964.  AL = EMM version number in BCD
  7965.  
  7966.  
  7967.  - upper four bits of AL contain the BCD major version
  7968.  - lower four bits of AL contain the BCD minor version
  7969.  - registers not listed are preserved
  7970.  
  7971. :int 67,47
  7972. ^INT 67,47 - Save Page Map Context  (LIM EMS 3.0+)
  7973.  
  7974.  
  7975.  AH = 47h
  7976.  DX = EMM handle assigned to the interrupt service routine
  7977.       servicing the interrupt
  7978.  
  7979.  
  7980.  on return:
  7981.  AH = 00  success
  7982.     = error code (see EMS STATUS)
  7983.  
  7984.  
  7985.  - any TSR, ISR or device driver using EMS should save contexts
  7986.    before manipulating EMS memory and restore contexts afterwards
  7987.  - registers not listed are preserved
  7988.  - see INT 67,48
  7989.  
  7990. :int 67,48
  7991. ^INT 67,48 - Restore Page Map Context  (LIM EMS 3.0+)
  7992.  
  7993.  
  7994.  AH = 48h
  7995.  DX = EMM handle assigned to the interrupt service routine
  7996.       servicing the interrupt
  7997.  
  7998.  
  7999.  on return:
  8000.  AH = 00  success
  8001.     = error code (see EMS STATUS)
  8002.  
  8003.  
  8004.  - any TSR, ISR or device driver using EMS should save contexts
  8005.    before manipulating EMS memory and restore contexts afterwards
  8006.  - registers not listed are preserved
  8007.  
  8008. :int 67,49
  8009. ^INT 67,49 - Get I/O Port Addresses  (LIM EMS ≤ 3.0)
  8010.  
  8011.  
  8012.  AH = 49h
  8013.  ES:DI = far pointer to storage array
  8014.  
  8015.  
  8016.  on return:
  8017.  AL = board count  (0 < AL <= 4)
  8018.  AH = 00 success
  8019.     = error code (see EMS STATUS)
  8020.  
  8021.  
  8022.  - defined in EMS 3.0, but undocumented in EMS 3.2;  new software
  8023.    should not use this function, but old software still works
  8024.  - registers not listed are preserved
  8025.  
  8026. :int 67,4a
  8027. ^INT 67,4A - Get Logical to Physical Page Mapping  (LIM EMS ≤ 3.0)
  8028.  
  8029.  
  8030.  AH = 4A
  8031.  DX = EMS handle
  8032.  ES:DI far pointer to storage array
  8033.  
  8034.  
  8035.  on return:
  8036.  AH = 00  success
  8037.     = error code (see EMS STATUS)
  8038.  BX = contains count of entries placed in array at ES:DI
  8039.  
  8040.  
  8041.  - defined in EMS 3.0, but undocumented in EMS 3.2;  new software
  8042.    should not use this function, but old software still works
  8043.  - registers not listed are preserved
  8044.  
  8045. :int 67,4b
  8046. ^INT 67,4B - Get Handle Count  (LIM EMS)
  8047.  
  8048.  
  8049.  AH = 4Bh
  8050.  
  8051.  
  8052.  on return:
  8053.  AH = 00  success
  8054.     = error code (see EMS STATUS)
  8055.  BX = number of currently active EMM handles (0-256)
  8056.       zero indicates EMS not in use
  8057.  
  8058.  
  8059.  - to determine the number of handles available subtract BX from 255
  8060.  - registers not listed are preserved
  8061.  
  8062. :int 67,4c
  8063. ^INT 67,4C - Get Page Count for Handle  (LIM EMS)
  8064.  
  8065.  
  8066.  AH = 4Ch
  8067.  DX = EMM handle
  8068.  
  8069.  
  8070.  on return:
  8071.  AH = 00  success
  8072.     = error code (see EMS STATUS)
  8073.  BX = total allocated page count for handle (1-512)
  8074.  
  8075.  
  8076.  - a handle can refer to up to 512 logical pages
  8077.  - registers not listed are preserved
  8078.  
  8079. :int 67,4d
  8080. ^INT 67,4D - Get Page Count for All Handles  (LIM EMS)
  8081.  
  8082.  AH = 4Dh
  8083.  ES:DI = pointer to handle array
  8084.  
  8085.  
  8086.  on return:
  8087.  AH = 00  success
  8088.     = error code (see EMS STATUS)
  8089.  BX = number of active EMM handles (0..255)
  8090.  ES:DI = pointer to an array of entries of the format:
  8091.  
  8092.     Offset  Size     Description
  8093.       00    word   EMS handle number
  8094.       02    word   number of pages
  8095.  
  8096.  - buffer at ES:DI should be able to hold an array of at least 4*BX
  8097.  - an error will occur if ES:DI points to a buffer that will
  8098.    cause a segment swap
  8099.  - registers not listed are preserved
  8100. :int 67,4e
  8101. ^INT 67,4E - Get/Set Page Map Context  (LIM EMS 3.2+)
  8102.  
  8103.  AH = 4Eh
  8104.  AL = 00  get page mapping context into array
  8105.           ES:DI = pointer to destination array
  8106.       01  set page mapping context from array
  8107.           DS:SI = pointer to context source array
  8108.       02  get and set page mapping registers at once
  8109.           ES:DI = pointer to destination array
  8110.           DS:SI = pointer to context source array
  8111.       03  get size of page mapping array
  8112.       04-31  reserved
  8113.  
  8114.  
  8115.  on return:
  8116.  AH = 00  success
  8117.     = error code (see EMS STATUS)
  8118.  AL = bytes in pagemapping array (when AL=3)
  8119.  ES:DI = pointer to array with mapping info (AL=00/02)
  8120.  
  8121.  - an error will occur if ES:DI points to a buffer that will
  8122.    cause a segment swap
  8123.  - designed for use by multitasking operating systems only
  8124.  
  8125. :int 67,4f
  8126. ^INT 67,4F - Get/Set Partial Page Map  (LIM EMS 4.0+)
  8127.  
  8128.  AH = 4Fh
  8129.  
  8130.  AL = 00  get partial page map
  8131.       DS:SI = pointer to structure containing list of segments whose
  8132.               mapping contexts are to be saved
  8133.       ES:DI = pointer to array to receive page map
  8134.  
  8135.  AL = 01  set partial page map
  8136.       DS:SI = pointer to structure containing saved partial page map
  8137.  
  8138.  AL = 02  get size of partial page map
  8139.       BX = number of mappable segments in the partial map to be saved
  8140.  
  8141.  
  8142.  on return:
  8143.  AH = 00  success
  8144.     = error code (see EMS STATUS)
  8145.  AL = size of partial page map (if AL=2)
  8146.  
  8147. :int 67,50
  8148. ^INT 67,50 - Map/Unmap Multiple Handle Pages  (LIM EMS 4.0+)
  8149.  
  8150.  
  8151.  AH = 50h
  8152.  AL = 00 Map/unmap pages
  8153.     = 01 map/unmap segments
  8154.  DX = EMM handle
  8155.  CX = number of entries in array
  8156.  DS:SI = pointer to mapping array
  8157.  
  8158.  
  8159.  on return:
  8160.  AH = 00  success
  8161.     = error code (see EMS STATUS)
  8162.  
  8163. :int 67,51
  8164. ^INT 67,51 - Reallocate Pages  (LIM EMS 4.0+)
  8165.  
  8166.  
  8167.  AH = 51h
  8168.  DX = EMM handle
  8169.  BX = number of pages to be allocated to handle
  8170.  
  8171.  
  8172.  on return:
  8173.  AH = 00  success
  8174.     = error code (see EMS STATUS)
  8175.  BX = actual number of pages allocated to handle
  8176.  
  8177. :int 67,52
  8178. ^INT 67,52 - Get/Set Handle Attributes  (LIM EMS 4.0+)
  8179.  
  8180.  
  8181.  AH = 52h
  8182.  AL = 00  get handle attributes
  8183.       01  set handle attributes
  8184.       02  get attribute capability
  8185.  BL = new attribute (if AL=1)
  8186.  DX = EMM handle
  8187.  
  8188.  
  8189.  on return:
  8190.  AH = 00  success
  8191.     = error code (see EMS STATUS)
  8192.  AL = attribute (input AL=0)
  8193.       00  handle is volatile
  8194.       01  handle is nonvolatile
  8195.  AL = attribute capability (input AL=2)
  8196.       00  only volatile handles supported
  8197.       01  both volatile and nonvolatile supported
  8198.  
  8199. :int 67,53
  8200. ^INT 67,53 Get/Set Handle Name  (LIM EMS 4.0+)
  8201.  
  8202.  
  8203.  AH = 53h
  8204.  AL = 00 get handle name
  8205.          ES:DI = pointer to 8byte handle name array
  8206.  
  8207.       01 set handle name
  8208.          DS:SI = pointer to 8byte handle name
  8209.          DX = EMM handle
  8210.  
  8211.  
  8212.  on return:
  8213.  AH = status  (see EMS STATUS)
  8214.  
  8215. :int 67,54
  8216. ^INT 67,54 - Get Handle Directory  (LIM EMS 4.0+)
  8217.  
  8218.  
  8219.  AH = 54h
  8220.  AL = 00  get handle directory
  8221.           ES:DI = pointer to buffer for handle directory
  8222.  
  8223.       01  search for named handle
  8224.           DS:SI = pointer to 8byte name
  8225.  
  8226.       02  get total number of handles
  8227.  
  8228.  
  8229.  on return:
  8230.  AL = number of entries in handle directory (AL = 00h)
  8231.  DX = value of named handle (if AH was 01)
  8232.  BX = total number of handles (if AH was 02)
  8233.  AH = status  (see EMS STATUS)
  8234.  
  8235. :int 67,55
  8236. ^INT 67,55 - Alter Page Map and Jump  (LIM EMS 4.0+)
  8237.  
  8238.  
  8239.  AH = 55h
  8240.  AL = 00  physical page numbers provided by caller
  8241.       01  segment addresses provided by caller
  8242.  DX = EMM handle
  8243.  DS:SI = pointer to structure with map and jump address
  8244.  
  8245.  
  8246.  on return:
  8247.  AH = status  (see EMS STATUS)
  8248.  
  8249. :int 67,56
  8250. ^INT 67,56 - Alter Page Map and Call  (LIM EMS 4.0+)
  8251.  
  8252.  
  8253.  AH = 56h
  8254.  AL = 00  physical page numbers provided by caller
  8255.           DX = EMM handle
  8256.           DS:SI = pointer to structure with page map and call address
  8257.       01  segment addresses provided by caller
  8258.           DX = EMM handle
  8259.           DS:SI = pointer to structure with page map and call address
  8260.       02  get page map stack space required
  8261.  
  8262.  
  8263.  on return:
  8264.  BX = stack space required (AL = 02)
  8265.  AH = status  (see EMS STATUS)
  8266.  
  8267.  
  8268.  - if successful, the target address is called
  8269.  - use a RETF to return and restore mapping context
  8270.  
  8271. :int 67,57
  8272. ^INT 67,57 - Move/Exchange Memory Region  (LIM EMS 4.0+)
  8273.  
  8274.  
  8275.  AH = 57h
  8276.  AL = 00  move memory region
  8277.       01  exchange memory region
  8278.  DS:SI = pointer to structure describing source and destination
  8279.  
  8280.  
  8281.  on return:
  8282.  AH = status  (see EMS STATUS)
  8283.  
  8284. :int 67,58
  8285. ^INT 67,58 - Get Mappable Physical Address Array  (LIM EMS 4.0+)
  8286.  
  8287.  
  8288.  AH = 58h
  8289.  AL = 00  get mappable physical address array
  8290.           ES:DI = pointer to buffer to be filled with array
  8291.       01  get number of entries in m.p.a. array
  8292.  
  8293.  
  8294.  on return:
  8295.  CX = number of entries in array
  8296.  AH = status  (see EMS STATUS)
  8297.  
  8298. :int 67,59
  8299. ^INT 67,59 - Get Expanded Memory Hardware Information (LIM EMS 4.0+)
  8300.  
  8301.  
  8302.  AH = 59h
  8303.  AL = 00  get hardware configuration array
  8304.           ES:DI = pointer to buffer to be filled with array
  8305.       01  get unallocated raw page count
  8306.  
  8307.  
  8308.  on return:
  8309.  BX = unallocated raw pages (AL = 01)
  8310.  DX = total raw pages (AL = 01)
  8311.  AH = status  (see EMS STATUS)
  8312.  
  8313.  
  8314.  - subfunction 00 is for use by operating systems only; can be
  8315.    enabled or disabled at any time by the operating system
  8316.  
  8317. :int 67,5a
  8318. ^INT 67,5A - Allocate Standard/Raw Pages  (LIM EMS 4.0+)
  8319.  
  8320.  
  8321.  AH = 5A
  8322.  AL = 00  allocate standard pages
  8323.       01  allocate raw pages
  8324.  BX = number of pages to allocate
  8325.  
  8326.  
  8327.  on return:
  8328.  DX = EMM handle
  8329.  AH = status  (see EMS STATUS)
  8330.  
  8331. :int 67,5b
  8332. ^INT 67,5B - Alternate Map Register Set  (LIM EMS 4.0+)
  8333.  
  8334.  AH = 5B
  8335.  AL = 00  get alternate map register set
  8336.       01  set alternate map register set
  8337.           BL = new alternate map register set number
  8338.           ES:DI = pointer to map register context save area if BL=0
  8339.       02  get alternate map save array size
  8340.       03  allocate alternate map register set
  8341.       04  deallocate alternate map register set
  8342.           BL = number of alternate map register set
  8343.       05  allocate DMA register set
  8344.       06  enable DMA on alternate map register set
  8345.           BL = DMA register set number
  8346.           DL = DMA channel number
  8347.       07  disable DMA on alternate map register set
  8348.           BL = DMA register set number
  8349.       08  deallocate DMA register set
  8350.           BL = DMA register set number
  8351.  
  8352.  on return:
  8353.  AH = status  (see EMS STATUS)
  8354.  BL = active alternate map register set number if nonzero (AL=0)
  8355.     = number of alternate map register set; 0 if not supported (AL=3)
  8356.     = DMA register set number; zero if not supported (AL = 05)
  8357.  DX = array size in bytes (AL = 02)
  8358.  ES:DI = pointer to a map register context save area if BL=0 (AL=0)
  8359.  
  8360.  
  8361.  - for use by operating systems only; can be enabled or disabled
  8362.    at any time by the operating system
  8363.  
  8364. :int 67,5c
  8365. ^INT 67,5C - Prepare Expanded Memory for Warm Boot  (LIM EMS 4.0+)
  8366.  
  8367.  AH = 5C
  8368.  
  8369.  
  8370.  on return:
  8371.  AH = status  (see EMS STATUS)
  8372.  
  8373. :int 67,5d
  8374. ^INT 67,5D - Enable/Disable OS Functions  (LIM EMS 4.0+)
  8375.  
  8376.  
  8377.  AH = 5D
  8378.  AL = 00  enable OS function Set
  8379.       01  disable OS function Set
  8380.       02  return access key
  8381.  BX,CX = access key returned by first invocation
  8382.  
  8383.  
  8384.  on return:
  8385.  AH = status  (see EMS STATUS)
  8386.  BX,CX = access key, returned only on first invocation of function
  8387.  
  8388.  
  8389.  - function 2 resets memory manager, returns access key at next
  8390.    invocation
  8391.  
  8392. :int 67,60
  8393. ^INT 67,60 - LIM EMS Get Physical Window Array
  8394.  
  8395.  
  8396.  AH = 60h
  8397.  ES:DI = pointer to physical window array
  8398.  
  8399.  
  8400.  on return:
  8401.  AH = 00  success
  8402.     = error status  (see EMS STATUS)
  8403.  
  8404. :int 70
  8405. ^INT 70 - Real Time Clock Interrupt  (XT 286,AT,PS2)
  8406.  
  8407.  
  8408.  - called 1024 times per second for periodic and alarm functions
  8409.  - decrements a DWORD counter by 976µ sec (1/1024)
  8410.  - when DWORD reaches zero, bit 7 of designated wait flag is set
  8411.  - if alarm was enabled by  INT 1A,6  INT 4A  is called when counter
  8412.    reaches zero to activate alarm handler
  8413.  - not available in model 30 PS2
  8414.  
  8415.  
  8416.  - see   INT 15,83   INT 15,86
  8417.